Clamps the value between min and max.
min
max
void clampValue(int min, int max) { value = value.clamp(min, max); }