pymel.util.mathutils.clamp

clamp(x=0.0, min=0.0, max=1.0)

Clamps the value x between min and max

Return type:float