Android Utililty Methods Float Clamp

List of utility methods to do Float Clamp

Description

The list of methods to do Float Clamp are organized into topic(s).

Method

floatclamp(float x, float min, float max)
clamp
if (x > max)
    return max;
if (x < min)
    return min;
return x;
floatclamp(float min, float max, float value)
clamp
final float clamp;
if (value < min) {
    clamp = min;
} else if (value > max) {
    clamp = max;
} else {
    clamp = value;
return clamp;
byteclampByte(float value)
clamp Byte
return (byte) clamp(Byte.MIN_VALUE, Byte.MAX_VALUE, value);