clamp<T extends num> static method

T clamp<T extends num>(
  1. T value,
  2. T min,
  3. T max
)

Implementation

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