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
)
Public Shared Function Clamp (
value As Integer,
bound1 As Integer,
bound2 As Integer
) As Integer
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:
Int32The clamped value.
See Also