Click or drag to resize

RhinoMathClamp Method (Int32, Int32, Int32)

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

Namespace:  Rhino
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 5.0
Syntax
public static int Clamp(
	int value,
	int bound1,
	int bound2
)

Parameters

value
Type: SystemInt32
An integer.
bound1
Type: SystemInt32
A first bound.
bound2
Type: SystemInt32
A second bound. This does not necessarily need to be larger or smaller than bound1.

Return Value

Type: Int32
The clamped value.
See Also