MathHelperClamp Method (Int32, Int32, Int32) |
Restricts a value to be within a specified range.
Namespace: Ozeki.CommonAssembly: OzekiSDK (in OzekiSDK.dll) Version: 1.8.12.0 (1.8.12)
Syntax public 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
- Type: SystemInt32
The value to clamp. - minValue
- Type: SystemInt32
The minimum value. If the value is less than minValue the minValue will be used. - maxValue
- Type: SystemInt32
The minimum value. If the value is greater than maxValue the maxValue will be used.
Return Value
Type:
Int32See Also