Click or drag to resize
DigitalRuneMathHelperClampT Method
Clamps the specified value.

Namespace: DigitalRune.Mathematics
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
public static T Clamp<T>(
	T value,
	T min,
	T max
)
where T : Object, IComparable<T>

Parameters

value
Type: T
The value which should be clamped.
min
Type: T
The min limit.
max
Type: T
The max limit.

Type Parameters

T
The type of the value.

Return Value

Type: T
value clamped to the interval [min, max].
Remarks
Values within the limits are not changed. Values exceeding the limits are cut off.
See Also