Constrains a number to be within a specified range by clamping it between a minimum and maximum value.
If the value is less than the minimum, returns the minimum. If greater than the maximum, returns the maximum.
Otherwise returns the original value unchanged.
Constrains a number to be within a specified range by clamping it between a minimum and maximum value.
If the value is less than the minimum, returns the minimum. If greater than the maximum, returns the maximum.
Otherwise returns the original value unchanged.
Example