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

intmaxFill(final int n, final float f)
max Fill
return Math.min((int) Math.ceil((double) ((float) n * f)), n - 1);
floatmaxFloat(float var1, float var2)
max Float
return var1 > var2 ? var1 : var2;
floatmaximum(float first, float second)
maximum
if (first < second)
    return second;
else
    return first;
floatMaximum(float x, float y)

Returns the maximum of two float values

if (x > y)
    return (x);
else
    return (y);
intmaxInt(float a, float b)
Maximum value rounded up.
return ceil(max(a, b));
floatmaxLimit(float value, float max)
max Limit
return value > max ? max : value;
longmaxVal(int numbits)
max Val
return ~(~0L << numbits);
longmaxValue(byte length)
max Value
return (long) Math.pow(2, Byte.SIZE * length - 1);
longmaxValue(int bits)
Get the maximum value representable in a bits bit signed integer.
assert 0 < bits && bits <= 64;
return mask(bits - 1);
longmaxValueUnsigned(int bits)
Get the maximum value representable in a bits bit unsigned integer.
return getNbitNumberLong(bits);