M_Rhino_RhinoMath_Clamp - mcneel/rhinocommon-api-docs GitHub Wiki
Restricts a Double to be specified within an interval of two numbers.
Namespace: Rhino
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0
C#
public static double Clamp(
double value,
double bound1,
double bound2
)
VB
Public Shared Function Clamp (
value As Double,
bound1 As Double,
bound2 As Double
) As Double
- value
- Type: System.Double
A number. - bound1
- Type: System.Double
A first bound. - bound2
- Type: System.Double
A second bound. This does not necessarily need to be larger or smaller than bound1.
Type: Double
The clamped value.
Supported in: 5D58w