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-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax public 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