Class PolarPoint

java.lang.Object
mathvoyage.geometry.PolarPoint
All Implemented Interfaces:
Point

public class PolarPoint extends Object implements Point
The type Polar point.
  • Constructor Details

    • PolarPoint

      public PolarPoint(double r, double theta)
      Instantiates a new Polar point.
      Parameters:
      r - the r
      theta - the theta
  • Method Details

    • getR

      public double getR()
      Returns the r-coordinate of the point.
      Specified by:
      getR in interface Point
      Returns:
      The r-coordinate of the point
    • getTheta

      public double getTheta()
      Returns the theta-coordinate of the point.
      Specified by:
      getTheta in interface Point
      Returns:
      The theta-coordinate of the point
    • getX

      public double getX()
      Returns the x-coordinate of the point.
      Specified by:
      getX in interface Point
      Returns:
      The x-coordinate of the point
    • getY

      public double getY()
      Returns the y-coordinate of the point.
      Specified by:
      getY in interface Point
      Returns:
      The y-coordinate of the point
    • toCartesian

      public Point toCartesian()
      Description copied from interface: Point
      To cartesian point.
      Specified by:
      toCartesian in interface Point
      Returns:
      the point
    • toPolar

      public Point toPolar()
      Description copied from interface: Point
      To polar point.
      Specified by:
      toPolar in interface Point
      Returns:
      the point