monkey:monkey.math.Clamp

Function Clamp:T( value:T,min:T,max:T )

Clamps a value to a range.

If x is less than min, min is returned.

If x is greater than max, max is returned.

Otherwise, x is returned.