List of utility methods to do Double Number Clamp
double | clamp_double(double num, double min, double max) clamdouble return num < min ? min : (num > max ? max : num);
|
double | clamp_double(double p_151237_0_, double p_151237_2_, double p_151237_4_) clamdouble return p_151237_0_ < p_151237_2_ ? p_151237_2_ : (p_151237_0_ > p_151237_4_ ? p_151237_4_ : p_151237_0_);
|
double | clamp_doubleback(double a, double x, double y) Returns the given double clamped between the two values. double newA = Math.abs(Math.IEEEremainder(a, 2 * (y - x))); if (newA > y) newA = 2 * y - newA; return newA; |
double | clamp_latitude(double lat) Ensure value is in the valid range for latitude ([-pi, pi]) if (lat > StrictMath.PI) { return StrictMath.PI; } else if (lat < -StrictMath.PI) { return -StrictMath.PI; } else { return lat; |
double | clampAngle(double angle) Clamps the angle in the interval [0, 360), performing 360*N shift if needed. if (angle >= 0) return angle % 360; return 360 * ceiling(-angle / 360) + angle; |
double | clampedLerp(double lowerBnd, double upperBnd, double slide) clamped Lerp return slide < 0.0D ? lowerBnd : (slide > 1.0D ? upperBnd : lowerBnd + (upperBnd - lowerBnd) * slide);
|
float | clampFloat(double in) Clamps a number to the range supported by float data type. return (in > Float.MAX_VALUE ? Float.MAX_VALUE : (in >= FLOAT_MIN ? (float) in : FLOAT_MIN)); |
double | clampMax(double val, double max) clamp Max return val < max ? val : max; |
double | clampMax(final double MAX, final double VALUE) clamp Max if (VALUE > MAX) return MAX; return VALUE; |
double | clampMin(double input, double min) Ensures that a number is bigger than a given value. if (input < min) return min; else return input; |