class MathStaticExtensions extends Object
Static method extensions to the Math class.
| Constructor and description |
|---|
MathStaticExtensions() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static int |
clamp(Math self, int value, int lower, int upper)Clamp an int value to the given range. |
|
static float |
clamp(Math self, float value, float lower, float upper)Clamp a float value to the given range. |
|
static int |
wrap(Math self, int value, int lower, int upper)Wrap an int value within a certain range. |
|
static float |
wrap(Math self, float value, float lower, float upper)Wrap a float value within a certain range. |
Clamp an int value to the given range. Both lower and upper values
are inclusive.
Math class in Java 21. Clamp a float value to the given range. Both lower and upper values
are inclusive.
Math class in Java 21. Wrap an int value within a certain range. The lower value is
inclusive, whereas the upper value is not.
@return
Wrap a float value within a certain range. The lower value is
inclusive, whereas the upper value is not.
@return