Math

math.clamp

Returns a number between min and max, inclusive. If x is below min or above max, it will return min or max respectively.

Syntax

clamp(x: number, min: number, max: number)  returns  number