Clamp

This function clamps a number between a minimum and maximum limit and returns the result.

Syntax

Parameters

Returns

If the number f is less than the min, the min is returned. If the number f is greater than the max, the max is returned. Otherwise, f is returned.