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