monkey:monkey.math.Clamp
Clamps a value to a range.
If x is less than min, min is returned.
x
min
If x is greater than max, max is returned.
max
Otherwise, x is returned.