MathHelper.max

Returns the greater of two {@code float} values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.

@param a an argument. @param b another argument. @return the larger of {@code a} and {@code b}.

  1. int max(int a, int b)
  2. long max(long a, long b)
  3. float max(float a, float b)
    class MathHelper
    static
    float
    max
    (
    float a
    ,
    float b
    )
  4. double max(double a, double b)

Meta