clamp

cgp_generic_utils.maths.clamp(value, minimumValue, maximumValue)

clamp the value between the minimum and the maximum value

Parameters:
  • value (int or float) – value to clamp
  • minimumValue (int or float) – minimum value of the clamp
  • maximumValue (int or float) – maximum value of the clamp
Returns:

the clamped value

Return type:

int or float