Description:

Limits a double to be specified within an interval of two numbers, by specifying a fixed minimum and maximum.

Syntax:
public static double Clamp(
double value,
double bound1,
double bound2
)
Parameters:
  • bound1
  • Type: double
  • A first bound.
  • bound2
  • Type: double
  • A second bound. This does not necessarily need to be larger or smaller than bound1.
Returns:
Type: double
The clamped value.
Available since:
5.0

Description:

Restricts a int to be specified within an interval of two integers.

Syntax:
public static int Clamp(
int value,
int bound1,
int bound2
)
Parameters:
  • value
  • Type: int
  • An integer.
  • bound1
  • Type: int
  • A first bound.
  • bound2
  • Type: int
  • A second bound. This does not necessarily need to be larger or smaller than bound1.
Returns:
Type: int
The clamped value.
Available since:
5.0

Clamp method

Class:  Rhino.RhinoMath

Nothing found