-
Sub-task
-
Resolution: Delivered
-
P4
-
21
The methods `Math.clamp()` and `StrictMath.clamp()` are added to conveniently clamp the numeric value between the specified minimum and maximum values. Four overloads are provided in both `Math` and `StrictMath` classes for `int`, `long`, `float`, and `double` types. A `clamp(long value, int min, int max)` overload can also be used to safely narrow a `long` value to `int`.