-
public class MathUtil
-
-
Field Summary
Fields Modifier and Type Field Description public final static doubleD000_RADSpublic final static doubleD045_RADSpublic final static doubleD090_RADSpublic final static doubleD120_RADSpublic final static doubleD135_RADSpublic final static doubleD180_RADSpublic final static doubleD225_RADSpublic final static doubleD270_RADSpublic final static doubleD360_RADS
-
Method Summary
Modifier and Type Method Description static doublemaxAbsoluteValue(Array<double> values)Finds the maximum absolute value in a array. static doublelimitAbsoluteValue(double num, double maxAbsoluteValue)Limits the absolute value of a number. static doubleconstrainAngleTo2PIRads(double angle)Mods the angle into a positive value between 0 and 2PI radians [0°, 360°) static doubleconstrainAngleToPIRads(double angle)Mods the angle into a range between -PI and PI radians (-180° and 180°]. static doubleinchesToMillimeters(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
-
-
-
-