Returns the value clamped between min and max.
min
max
int clampTo(int min, int max) => clamp(min, max).toInt();