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-local+709673996c0cc3c0733358a87691d1009326afa7
Syntaxpublic 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