Class PolarCoor

  • All Implemented Interfaces:
    java.io.Serializable

    public class PolarCoor
    extends java.lang.Object
    implements java.io.Serializable
    Polar coordinate.
    Since:
    13107 (extracted from AlignInCircleAction)
    See Also:
    Serialized Form
    • Field Detail

      • radius

        public final double radius
        Radial coordinate (distance from the pole).
      • angle

        public final double angle
        Angular coordinate in radians.
      • pole

        public final EastNorth pole
        Reference point (analogous to the origin of a Cartesian coordinate system).
    • Constructor Detail

      • PolarCoor

        public PolarCoor​(double radius,
                         double angle)
        Constructs a new PolarCoor, using (0,0) as pole.
        Parameters:
        radius - radial coordinate (distance from the pole)
        angle - angular coordinate in radians
      • PolarCoor

        public PolarCoor​(double radius,
                         double angle,
                         EastNorth pole)
        Constructs a new PolarCoor.
        Parameters:
        radius - radial coordinate (distance from the pole)
        angle - angular coordinate in radians
        pole - reference point (analogous to the origin of a Cartesian coordinate system)
      • PolarCoor

        public PolarCoor​(EastNorth en)
        Constructs a new PolarCoor from an EastNorth, using (0,0) as pole.
        Parameters:
        en - east/north coordinates
      • PolarCoor

        public PolarCoor​(EastNorth en,
                         EastNorth pole)
        Constructs a new PolarCoor.
        Parameters:
        en - east/north coordinates
        pole - reference point (analogous to the origin of a Cartesian coordinate system)
    • Method Detail

      • computeAngle

        public static double computeAngle​(EastNorth en,
                                          EastNorth pole)
        Compute polar angle between an east/north and the pole.
        Parameters:
        en - east/north coordinates
        pole - reference point (analogous to the origin of a Cartesian coordinate system)
        Returns:
        polar angle in radians
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object