RhinoMath.Clamp Method (Int32, Int32, Int32)
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)
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.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.7
See Also