Package mathvoyage.geometry
Class CartesianPoint
java.lang.Object
mathvoyage.geometry.CartesianPoint
- All Implemented Interfaces:
Point
The type Cartesian point.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetR()Returns the r-coordinate of the point.doublegetTheta()Returns the theta-coordinate of the point.doublegetX()Returns the x-coordinate of the point.doublegetY()Returns the y-coordinate of the point.To cartesian point.toPolar()To polar point.
-
Constructor Details
-
CartesianPoint
public CartesianPoint(double x, double y) Instantiates a new Cartesian point.- Parameters:
x- the xy- the y
-
-
Method Details
-
getX
public double getX()Returns the x-coordinate of the point. -
getY
public double getY()Returns the y-coordinate of the point. -
getR
public double getR()Returns the r-coordinate of the point. -
getTheta
public double getTheta()Returns the theta-coordinate of the point. -
toPolar
Description copied from interface:PointTo polar point. -
toCartesian
Description copied from interface:PointTo cartesian point.- Specified by:
toCartesianin interfacePoint- Returns:
- the point
-