-
public class MathUtil
-
-
Field Summary
Fields Modifier and Type Field Description public final static double
D000_RADS
public final static double
D045_RADS
public final static double
D090_RADS
public final static double
D120_RADS
public final static double
D135_RADS
public final static double
D180_RADS
public final static double
D225_RADS
public final static double
D270_RADS
public final static double
D360_RADS
-
Method Summary
Modifier and Type Method Description static double
maxAbsoluteValue(Array<double> values)
Finds the maximum absolute value in a array. static double
limitAbsoluteValue(double num, double maxAbsoluteValue)
Limits the absolute value of a number. static double
constrainAngleTo2PIRads(double angle)
Mods the angle into a positive value between 0 and 2PI radians [0°, 360°) static double
constrainAngleToPIRads(double angle)
Mods the angle into a range between -PI and PI radians (-180° and 180°]. static double
inchesToMillimeters(double inches)
Converts inches to millimeters -
-
Method Detail
-
maxAbsoluteValue
static double maxAbsoluteValue(Array<double> values)
Finds the maximum absolute value in a array.
- Parameters:
values
- array of values.
-
limitAbsoluteValue
static double limitAbsoluteValue(double num, double maxAbsoluteValue)
Limits the absolute value of a number.
- Parameters:
num
- number to be limited.maxAbsoluteValue
- maximum absolute value the number can take.
-
constrainAngleTo2PIRads
static double constrainAngleTo2PIRads(double angle)
Mods the angle into a positive value between 0 and 2PI radians [0°, 360°)
- Parameters:
angle
- input angle.
-
constrainAngleToPIRads
static double constrainAngleToPIRads(double angle)
Mods the angle into a range between -PI and PI radians (-180° and 180°].
- Parameters:
angle
- input angle.
-
inchesToMillimeters
static double inchesToMillimeters(double inches)
Converts inches to millimeters
- Parameters:
inches
- value in inches
-
-
-
-