Clamps the supplied value to the specified inclusive range.
Namespace:
Demo3D.Common
Assembly:
Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntaxpublic static T Clamp<T>(
T value,
T min,
T max
)
where T : Object, IComparable<T>
Parameters
- value
- Type: T
The value to clamp. - min
- Type: T
The minimum value in the range. - max
- Type: T
The maximum value in the range.
Type Parameters
- T
- The comparable type.
Return Value
Type:
TThe clamped value.
See Also