Math.max
Class Overview | Class Members |
This Package |
All Packages
public static int max( int a,
int b )
Parameters
- a
- an int value.
- b
- an int value.
Returns
the larger of a and b.
Description
Returns the greater of two int values.
public static long max( long a,
long b )
Parameters
- a
- a long value.
- b
- a long value.
Returns
the larger of a and b.
Description
Returns the greater of two long values.
public static float max( float a,
float b )
Parameters
- a
- a float value.
- b
- a float value.
Returns
the larger of a and b.
Description
Returns the greater of two float values. If either value
is NaN, then the result is NaN. Unlike the
the numerical comparison operators, this method considers negative zero
to be strictly smaller than positive zero.
public static double max( double a,
double b )
Parameters
- a
- a double value.
- b
- a double value.
Returns
the larger of a and b.
Description
Returns the greater of two double values. If either value
is NaN, then the result is NaN. Unlike the
the numerical comparison operators, this method considers negative zero
to be strictly smaller than positive zero.