clamp
Clamp a number between a minimum and maximum value.
Example
#assert(calc.clamp(5, 0, 10) == 5)
#assert(calc.clamp(5, 6, 10) == 6)
#calc.clamp(5, 0, 4)

ParametersParameters are the inputs to a function. They are specified in parentheses after the function name.
Parameters are the inputs to a function. They are specified in parentheses after the function name.
value
The number to clamp.
min
The inclusive minimum value.
max
The inclusive maximum value.