(value, mn, mx)
return max(min(value, mx), mn)
Clamp the value to the the given minimum and maximum.
Clamp the value to the the given minimum and maximum.
Clamp the value to the the given minimum and maximum .
def clamp(value, mn, mx):
    """Clamp the value to the the given minimum and maximum."""

    return max(min(value, mx), mn)
def clamp ( value , mn , mx ) : return max ( min ( value , mx ) , mn )