Java Number Min Value minMax(long x, long y, boolean max)

Here you can find the source of minMax(long x, long y, boolean max)

Description

min Max

License

Open Source License

Parameter

Parameter Description
x a parameter
y a parameter
max a parameter

Declaration

private static long minMax(long x, long y, boolean max) 

Method Source Code

//package com.java2s;
/**/*from  ww w . j  av  a 2s  . c o  m*/
 * Copyright (c) 2011 Martin Geisse
 *
 * This file is distributed under the terms of the MIT license.
 */

public class Main {
    /**
     * @param x
     * @param y
     * @param max
     * @return
     */
    private static long minMax(long x, long y, boolean max) {
        if (max) {
            return (x > y ? x : y);
        } else {
            return (x < y ? x : y);
        }
    }
}

Related

  1. minMax(double v, double min, double max)
  2. minMax(int i)
  3. minmax(int min, int max, int now)
  4. minMax(int val, int min, int max)
  5. minMax(int value, int min, int max)
  6. minMaxInt(Long i1, String s, boolean max)
  7. minMaxNormalize(double min, double max, double value)
  8. minNot0(double i1, double i2)
  9. minNotMinus1(int i1, int i2)