MathHelperClamp Method (Int32, Int32, Int32) |
Restricts a value to be within a specified range.
Namespace:
SampSharp.Entities.SAMP
Assembly:
SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-local+709673996c0cc3c0733358a87691d1009326afa7
Syntaxpublic static int Clamp(
int value,
int min,
int max
)
Parameters
- value
- Type: SystemInt32
The value to clamp. - min
- Type: SystemInt32
The minimum value. If value is less than min, min will be returned. - max
- Type: SystemInt32
The maximum value. If value is greater than max, max will be returned.
Return Value
Type:
Int32The clamped value.
See Also