M_Rhino_RhinoMath_Clamp_1 - mcneel/rhinocommon-api-docs GitHub Wiki

RhinoMath.Clamp Method (Int32, Int32, Int32)

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

Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public static int Clamp(
	int value,
	int bound1,
	int bound2
)

VB

Public Shared Function Clamp ( 
	value As Integer,
	bound1 As Integer,
	bound2 As Integer
) As Integer

Parameters

 

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

Return Value

Type: Int32
The clamped value.

Version Information

Supported in: 5D58w

See Also

Reference

RhinoMath Class
Clamp Overload
Rhino Namespace

⚠️ **GitHub.com Fallback** ⚠️