clampClamps a value to specific bounds.
valueThe value to clamp.
minThe minimum value allowed for the output.
maxThe maximum value allowed for the output.
clampedIf the value is smaller than min, the output is min. If the value is greater than max, the output is max. In all other cases, the output is the input value.