Package 

Class MathUtil

    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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