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