Lines Matching defs:input
24 * If the input value lies outside of the specified range, return the nearer
25 * bound. Otherwise, return the input value, unchanged.
27 public static int clamp(int input, int lowerBound, int upperBound) {
28 if (input < lowerBound) return lowerBound;
29 if (input > upperBound) return upperBound;
30 return input;
34 * If the input value lies outside of the specified range, return the nearer
35 * bound. Otherwise, return the input value, unchanged.
37 public static float clamp(float input, float lowerBound, float upperBound) {
38 if (input < lowerBound) return lowerBound;
39 if (input > upperBound) return upperBound;
40 return input;
44 * If the input value lies outside of the specified range, return the nearer
45 * bound. Otherwise, return the input value, unchanged.
47 public static double clamp(double input, double lowerBound, double upperBound) {
48 if (input < lowerBound) return lowerBound;
49 if (input > upperBound) return upperBound;
50 return input;