Documentation of 'georegression.metric.UtilAngle' Java class
UtilAngle
georegression.metric

Class UtilAngle



  • public class UtilAngle
    extends java.lang.Object
    Utility functions relating to angles. Unless otherwise state all angles are in radians and have a domain of -pi to pi
    • Constructor Summary

      Constructors 
      Constructor and Description
      UtilAngle() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double atanSafe(double y, double x) 
      static float atanSafe(float y, float x) 
      static double bound(double ang)
      Returns an angle which is equivalent to the one provided, but between (inclusive) -π and π.
      static float bound(float ang)
      Returns an angle which is equivalent to the one provided, but between (inclusive) -π and π.
      static double degreeToRadian(double angleDegree) 
      static double dist(double angA, double angB)
      Returns the number of radians two angles are apart.
      static float dist(float angA, float angB)
      Returns the number of radians two angles are apart.
      static double distanceCCW(double angA, double angB)
      Angular distance in radians to go from angA to angB in counter clock-wise direction.
      static float distanceCCW(float angA, float angB)
      Angular distance in radians to go from angA to angB in counter clock-wise direction.
      static double distanceCW(double angA, double angB)
      Angular distance in radians to go from angA to angB in clock-wise direction.
      static float distanceCW(float angA, float angB)
      Angular distance in radians to go from angA to angB in clock-wise direction.
      static double distHalf(double angA, double angB)
      Angular distance between two half circle angles.
      static double domain2PI(double angle)
      Converts an angle from -pi to pi into 0 to 2*pi domain
      static boolean isHalfDomain(double ang)
      Checks to see if it is between -π/2 and π/2.
      static boolean isStandardDomain(double ang)
      Checks to see if it is between -π and π.
      static double minus(double angA, double angB)
      Returns the difference between two angles and bounds the result between -pi and pi:
      result = angA - angB
      and takes in account boundary conditions.
      static float minus(float angA, float angB)
      Returns the difference between two angles and bounds the result between -pi and pi:
      result = angA - angB
      and takes in account boundary conditions.
      static double radianToDegree(double angleRad) 
      static double toHalfCircle(double angle)
      Converts an angle which is (-pi to pi) into a half circle angle (-pi/2 to pi/2).
      static float toHalfCircle(float angle)
      Converts an angle which is (-pi to pi) into a half circle angle (0 to pi).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UtilAngle

        public UtilAngle()
    • Method Detail

      • radianToDegree

        public static double radianToDegree(double angleRad)
      • degreeToRadian

        public static double degreeToRadian(double angleDegree)
      • atanSafe

        public static double atanSafe(double y,
                                      double x)
      • atanSafe

        public static float atanSafe(float y,
                                     float x)
      • toHalfCircle

        public static double toHalfCircle(double angle)
        Converts an angle which is (-pi to pi) into a half circle angle (-pi/2 to pi/2).
        Parameters:
        angle - Angle between -pi and pi.
        Returns:
        -pi/2 to pi/2
      • toHalfCircle

        public static float toHalfCircle(float angle)
        Converts an angle which is (-pi to pi) into a half circle angle (0 to pi).
        Parameters:
        angle - Angle between -pi and pi.
        Returns:
        0 to pi
      • isStandardDomain

        public static boolean isStandardDomain(double ang)
        Checks to see if it is between -π and π.
        Parameters:
        ang - Angle being tested
        Returns:
        true if it is between -π and π
      • isHalfDomain

        public static boolean isHalfDomain(double ang)
        Checks to see if it is between -π/2 and π/2.
        Parameters:
        ang - Angle being tested
        Returns:
        true if it is between -π/2 and π/2;
      • bound

        public static double bound(double ang)
        Returns an angle which is equivalent to the one provided, but between (inclusive) -π and π.
      • bound

        public static float bound(float ang)
        Returns an angle which is equivalent to the one provided, but between (inclusive) -π and π.
      • distanceCCW

        public static double distanceCCW(double angA,
                                         double angB)
        Angular distance in radians to go from angA to angB in counter clock-wise direction. The resulting angle will be from 0 to 2π.
        Parameters:
        angA - First angle. -pi to pi
        angB - Second angle -pi to pi
        Returns:
        An angle from 0 to 2 π
      • distanceCCW

        public static float distanceCCW(float angA,
                                        float angB)
        Angular distance in radians to go from angA to angB in counter clock-wise direction. The resulting angle will be from 0 to 2π.
        Parameters:
        angA - First angle. -pi to pi
        angB - Second angle -pi to pi
        Returns:
        An angle from 0 to 2 π
      • distanceCW

        public static double distanceCW(double angA,
                                        double angB)
        Angular distance in radians to go from angA to angB in clock-wise direction. The resulting angle will be from 0 to 2π.
        Parameters:
        angA - First angle. -pi to pi
        angB - Second angle -pi to pi
        Returns:
        An angle from 0 to 2 π
      • distanceCW

        public static float distanceCW(float angA,
                                       float angB)
        Angular distance in radians to go from angA to angB in clock-wise direction. The resulting angle will be from 0 to 2π.
        Parameters:
        angA - First angle. -pi to pi
        angB - Second angle -pi to pi
        Returns:
        An angle from 0 to 2 π
      • minus

        public static double minus(double angA,
                                   double angB)

        Returns the difference between two angles and bounds the result between -pi and pi:
        result = angA - angB
        and takes in account boundary conditions.

        Parameters:
        angA - first angle. Must be between -pi and pi.
        angB - second angle. Must be between -pi and pi.
        Returns:
        an angle between -pi and pi
      • minus

        public static float minus(float angA,
                                  float angB)

        Returns the difference between two angles and bounds the result between -pi and pi:
        result = angA - angB
        and takes in account boundary conditions.

        Parameters:
        angA - first angle. Must be between -pi and pi.
        angB - second angle. Must be between -pi and pi.
        Returns:
        an angle between -pi and pi
      • dist

        public static double dist(double angA,
                                  double angB)

        Returns the number of radians two angles are apart. This is equivalent to Math.abs(UtilAngle.minus(angA,angB)).

        Parameters:
        angA - first angle. Must be between -pi and pi.
        angB - second angle. Must be between -pi and pi.
        Returns:
        an angle between 0 and pi
      • dist

        public static float dist(float angA,
                                 float angB)

        Returns the number of radians two angles are apart. This is equivalent to Math.abs(UtilAngle.minus(angA,angB)).

        Parameters:
        angA - first angle. Must be between -pi and pi.
        angB - second angle. Must be between -pi and pi.
        Returns:
        an angle between 0 and pi
      • distHalf

        public static double distHalf(double angA,
                                      double angB)
        Angular distance between two half circle angles.
        Parameters:
        angA - Angle between -pi/2 and pi/2.
        angB - Angle between -pi/2 and pi/2.
        Returns:
        Acute angle between the two input angles.
      • domain2PI

        public static double domain2PI(double angle)
        Converts an angle from -pi to pi into 0 to 2*pi domain
        Parameters:
        angle - angle from -pi to pi radians
        Returns:
        angle from 0 to 2*pi radians

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.