clamp<T extends num> static method
T
clamp<T extends num>(
- T value,
- T minimumValue,
- T maximumValue
Implementation
static T clamp<T extends num>(T value, T minimumValue, T maximumValue)
{
return Math.max(minimumValue, Math.min(maximumValue, value) );
}