public class MathEx extends Object
| Constructor and Description |
|---|
MathEx() |
| Modifier and Type | Method and Description |
|---|---|
static double |
convertToDegrees(double angle)
Converts radians to degrees.
|
static double |
convertToRadians(double angle)
Converts degrees to radians.
|
static double |
getNonNegativeValue(double value) |
static double |
max(double... values)
Returns the largest double value of supplied arguments.
|
static double |
min(double... values)
Returns the smallest double value of supplied arguments.
|
static double |
normalizeAngle(double angle) |
static int |
roundToInt(double value)
Rounds the value and casts it to integer.
|
static double |
toNegativePositivePercentage(double value,
double min,
double max) |
public static double convertToDegrees(double angle)
Converts radians to degrees.
angle - The angle in radians.public static double convertToRadians(double angle)
Converts degrees to radians.
angle - The angle in degrees.public static double getNonNegativeValue(double value)
public static double max(double... values)
Returns the largest double value of supplied arguments.
values - Values to compare.public static double min(double... values)
Returns the smallest double value of supplied arguments.
values - Values to compare.public static double normalizeAngle(double angle)
public static int roundToInt(double value)
Rounds the value and casts it to integer.
value - Value to be rounded.public static double toNegativePositivePercentage(double value,
double min,
double max)
Copyright © 2026. All rights reserved.