MathHelperClamp Method (Single, Single, Single) |
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 float Clamp(
float value,
float min,
float max
)
Parameters
- value
- Type: SystemSingle
The value to clamp. - min
- Type: SystemSingle
The minimum value. If value is less than min, min will be returned. - max
- Type: SystemSingle
The maximum value. If value is greater than max, max will be returned.
Return Value
Type:
SingleThe clamped value.
See Also