Click or drag to resize

UtilClampT Method

Clamps the supplied value to the specified inclusive range.

Namespace: Demo3D.Common
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntax
C#
public 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

T
The clamped value.
See Also