clampDouble method Null safety
Clamps an integer between two floating-point numbers.
Returns input when min <= input <= max, and either min or max otherwise.
Implementation
static double clampDouble(double min, double max, double input) {
if (input < min) {
return min;
} else if (input > max) {
return max;
}
return input;
}