clamp method

clamp

Clamp value to range [min, max]

Returns

The value between [min, max]

def clamp(self, val, min, max):
    ...
ParameterTypeDescription
valfloatValue to clamp.
minfloatMinimum value.
maxfloatMaximum value.

See Also