lt.monarch.math.geom
Class PolarPoint

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
          extended by lt.monarch.math.geom.Point2D
              extended by 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 Class Summary
Modifier and Type Class and Description
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
 
Field Summary
Modifier and Type Field and Description
 
Fields inherited from class java.awt.geom.Point2D.Double
x, y
 
Constructor Summary
Constructor and Description
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
Modifier and Type Method and Description
 double getAngle()
          Returns the angle of the polar point.
 double getRadius()
          Returns the radius of the polar point.
 
Methods inherited from class lt.monarch.math.geom.Point2D
set, setX, setY, toString
 
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
 
Methods inherited from interface lt.monarch.math.geom.GeneralPoint
getX, getY
 

Constructor Detail

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 radians
radius - 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
Method Detail

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