lt.monarch.math.geom
Class PolarPoint
java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
lt.monarch.math.geom.Point2D
lt.monarch.math.geom.PolarPoint
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, GeneralPoint
public class PolarPoint
extends Point2D
Defines a point in a polar 2-dimensional coordinate space. Location of a point is defined as a
distance from the center and an angle. Distance should be in range [0,1]. Angle is defined in
radians.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.awt.geom.Point2D |
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
| Fields inherited from class java.awt.geom.Point2D.Double |
x, y |
Constructor Summary
PolarPoint()
Constructs a new PolarPoint. |
PolarPoint(double angle,
double radius)
Constructs a new PolarPoint with the specified angle and radius. |
PolarPoint(PolarPoint pt)
Constructs a new PolarPoint with the angle and radius taken from the specified
polar point. |
Method Summary
double |
getAngle()
Returns the angle of the polar point. |
double |
getRadius()
Returns the radius of the polar point. |
| Methods inherited from class java.awt.geom.Point2D.Double |
getX, getY, setLocation |
| Methods inherited from class java.awt.geom.Point2D |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
PolarPoint
public PolarPoint()
- Constructs a new
PolarPoint.
PolarPoint
public PolarPoint(double angle,
double radius)
- Constructs a new
PolarPoint with the specified angle and radius.
- Parameters:
angle - the angle defined in radiansradius - the distance from the center in range [0,1]
PolarPoint
public PolarPoint(PolarPoint pt)
- Constructs a new
PolarPoint with the angle and radius taken from the specified
polar point.
- Parameters:
pt - the PolarPoint the radius and angle to take from
getRadius
public double getRadius()
- Returns the radius of the polar point.
- Returns:
- the radius of the polar point
getAngle
public double getAngle()
- Returns the angle of the polar point.
- Returns:
- the angle of the polar point