New math functions to help you do some math! Courtesy of @0xBAADF00D

number math.clamp(number *x*, number *min*, number *max*)

- If
*min*is greater than*max*, an error is thrown indicating that min must be less than max - If
*x*is less than*min*, it returns*min* - If
*x*is greater than*max*, it returns*max* - If any argument is missing, nil, or otherwise not a number, an error will be thrown stating this
- Otherwise, it returns
*val*

number math.sign(number x)

Returns 1 if x is greater than 0, -1 if x is less than 0, or 0 if x is 0.