public class MathUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
clamp(double val,
double min,
double max)
Clamp value to range [min, max]
|
static double |
toDegree(double radian)
Convert a number from radian to degree
|
static Vector3 |
toDegree(double x,
double y,
double z)
Convert a number from radian to degree
|
static float |
toDegree(float radian)
Convert a number from radian to degree
|
static Vector3 |
toDegree(Vector3 radian)
Convert a
Vector3 from radian to degree. |
static double |
toRadian(double degree)
Convert a number from degree to radian
|
static Vector3 |
toRadian(double x,
double y,
double z)
Convert a vector from degree to radian
|
static float |
toRadian(float degree)
Convert a number from degree to radian
|
static Vector3 |
toRadian(Vector3 degree)
Convert a
Vector3 from degree to radian |
public static double clamp(double val, double min, double max)
val
- Value to clamp.min
- Minimum value.max
- Maximum value.public static Vector3 toDegree(Vector3 radian)
Vector3
from radian to degree.radian
- The radian value.public static Vector3 toRadian(Vector3 degree)
Vector3
from degree to radiandegree
- The degree value.public static float toDegree(float radian)
radian
- The radian value.public static double toDegree(double radian)
radian
- The radian value.public static Vector3 toDegree(double x, double y, double z)
x
- The x component in radian value.y
- The y component in radian value.z
- The z component in radian value.public static float toRadian(float degree)
degree
- The degree value.public static double toRadian(double degree)
degree
- The degree value.public static Vector3 toRadian(double x, double y, double z)
x
- The x component in degree value.y
- The y component in degree value.z
- The z component in degree value.