copapy.clamp#

copapy.clamp(x, min_value, max_value)#

Clamp function to limit a value between a minimum and maximum.

Parameters:
  • x (TypeVar(U, int, float) | value[TypeVar(U, int, float)] | vector[TypeVar(U, int, float)]) – Input value

  • min_value (TypeVar(U, int, float) | value[TypeVar(U, int, float)]) – Minimum limit

  • max_value (TypeVar(U, int, float) | value[TypeVar(U, int, float)]) – Maximum limit

Return type:

Any

Returns:

Clamped value of x