clampDouble static method

double clampDouble(
  1. double min,
  2. double max,
  3. double input
)

Implementation

static double clampDouble(double min, double max, double input) {
  if (input < min) {
    return min;
  } else if (input > max) {
    return max;
  }
  return input;
}