util
Class Point2DDouble

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by java.awt.geom.Point2D.Double
          extended by util.Point2DDouble
All Implemented Interfaces:
Serializable, Cloneable

public class Point2DDouble
extends Point2D.Double

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Point2D.Double
x, y
 
Constructor Summary
Point2DDouble()
           
Point2DDouble(double x, double y)
           
Point2DDouble(Point2DDouble pt)
           
 
Method Summary
 double getLength()
          Returns the length of the vector from the origin to this point.
 void multBy(double a)
           
 void setLocation(Point2DDouble pt)
           
 void translate(double x, double y)
           
 void translate(Point2DDouble delta)
           
 Point2DDouble unitVecTo(Point2DDouble pt)
          Returns a unit vector in the direction from this pt to the given pt
 Point2DDouble vecTo(Point2DDouble pt)
          Returns a vector pointing from this point to the given pt.
 
Methods inherited from class java.awt.geom.Point2D.Double
getX, getY, setLocation, toString
 
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
 

Constructor Detail

Point2DDouble

public Point2DDouble()

Point2DDouble

public Point2DDouble(double x,
                     double y)

Point2DDouble

public Point2DDouble(Point2DDouble pt)
Method Detail

translate

public void translate(double x,
                      double y)

translate

public void translate(Point2DDouble delta)

setLocation

public void setLocation(Point2DDouble pt)

multBy

public void multBy(double a)

unitVecTo

public Point2DDouble unitVecTo(Point2DDouble pt)
Returns a unit vector in the direction from this pt to the given pt


vecTo

public Point2DDouble vecTo(Point2DDouble pt)
Returns a vector pointing from this point to the given pt.


getLength

public double getLength()
Returns the length of the vector from the origin to this point.