/**
* Clamps an integer between two integers.
*
* @returninput when min <= input <= max, and either minormax
* otherwise.
*/
export function clampInt(min, max, input) {
if (input < min) {
returnmin;
} elseif (input > max) {
returnmax;
}
returninput;
}