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

intmax255(float val)
max
if (val > 255) {
    return 255;
return (int) val;
doublemax3(double a, double b, double c)
max
return Math.max(a, Math.max(b, c));
intmax3(int a, int b, int c)
Returns the maximum of the three specified values.
return Math.max(Math.max(a, b), c);
intmax3(int first, int second, int third)
max
return Math.max(Math.max(first, second), third);
intMAX3(int x, int y, int z)
MAX
return MAX2(MAX2(x, y), z);
doublemax4(double v1, double v2, double v3, double v4)
max
return Math.max(Math.max(v1, v2), Math.max(v3, v4));
doublemax8(double v1, double v2, double v3, double v4, double v5, double v6, double v7, double v8)
max
return Math.max(max4(v1, v2, v3, v4), max4(v5, v6, v7, v8));
floatmaxDelta(float newValue, float oldValue, float maxChange)
max Delta
if ((newValue - oldValue) > maxChange) {
    return oldValue + maxChange;
if ((oldValue - newValue) > maxChange) {
    return oldValue - maxChange;
return newValue;
floatmaxF(float a, float b)
Unchecked implementation to determine the larger of two Floats.
return a > b ? a : b;
intmaxFill(final int n, final float f)
Returns the maximum number of entries that can be filled before rehashing.
return (int) Math.ceil(n * f);