MathHelperClamp(Int32, Int32, Int32) Method |
Restricts a value to be within a specified range.
Namespace: Ozeki.CommonAssembly: OzekiSDK (in OzekiSDK.dll) Version: 10.4.13.0
Syntaxpublic static int Clamp(
int value,
int minValue,
int maxValue
)
Public Shared Function Clamp (
value As Integer,
minValue As Integer,
maxValue As Integer
) As Integer
public:
static int Clamp(
int value,
int minValue,
int maxValue
)
static member Clamp :
value : int *
minValue : int *
maxValue : int -> int
Parameters
- value Int32
- The value to clamp.
- minValue Int32
- The minimum value. If the value is less than minValue the minValue will be used.
- maxValue Int32
- The minimum value. If the value is greater than maxValue the maxValue will be used.
Return Value
Int32
See Also