Java Utililty Methods Number Max Value

List of utility methods to do Number Max Value

Description

The list of methods to do Number Max Value are organized into topic(s).

Method

bytemax(byte value, byte max)
max
return value > max ? max : value;
bytemax(byte value1, byte value2)
Gets the maximum byte value from two values
return value1 > value2 ? value1 : value2;
doublemax(double a, double b)
max
return Math.max(a, b);
doublemax(double a, double b)
max
return a > b ? a : b;
doublemax(double a, double b)
Binary max, without handling of special values.
return a >= b ? a : b;
doublemax(double a, double b, double c, double d)
Return largest of four numbers.
return Math.max(Math.max(a, b), Math.max(c, d));
doublemax(double a, double b, double c, double d)
max
return Math.max(Math.max(a, b), Math.max(c, d));
doublemax(double d1, double d2)
Returns the maximum value of d1 and d2.
if (Double.isNaN(d1))
    return d2;
else if (Double.isNaN(d2))
    return d1;
else
    return Math.max(d1, d2);
doublemax(double first, double second, double third, double fourth)
max
if (first > second && first > third && first > fourth) {
    return first;
if (second > third && second > fourth) {
    return second;
if (third > fourth) {
    return third;
...
doublemax(double n1, double n2, double n3)
max
return Math.max(n1, Math.max(n2, n3));