Class CartesianPoint

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

public class CartesianPoint extends Object implements Point
The type Cartesian point.
  • Constructor Details

    • CartesianPoint

      public CartesianPoint(double x, double y)
      Instantiates a new Cartesian point.
      Parameters:
      x - the x
      y - the y
  • Method Details

    • 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
    • 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
    • toPolar

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

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