Package mathvoyage.geometry
Class PolarPoint
java.lang.Object
mathvoyage.geometry.PolarPoint
- All Implemented Interfaces:
Point
The type Polar 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
-
PolarPoint
public PolarPoint(double r, double theta) Instantiates a new Polar point.- Parameters:
r- the rtheta- the theta
-
-
Method Details
-
getR
public double getR()Returns the r-coordinate of the point. -
getTheta
public double getTheta()Returns the theta-coordinate of the point. -
getX
public double getX()Returns the x-coordinate of the point. -
getY
public double getY()Returns the y-coordinate of the point. -
toCartesian
Description copied from interface:PointTo cartesian point.- Specified by:
toCartesianin interfacePoint- Returns:
- the point
-
toPolar
Description copied from interface:PointTo polar point.
-