Math.minDouble()
Signature
double minDouble (double a, double b)
Description
Returns the smaller of two double
values. That
is, the result is the value closer to negative 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 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 is negative zero, the
result is negative zero.
Parameters
Name | Type | Description |
a | double | An argument. |
b | double | Another argument. |
Returns
Type | Description |
double | The smaller of a and b . |
Example
String result = String.valueOfDouble (Math.minDouble (4.32, 29.34));
Result is: result contains: "4.32"