org.openjump.core.geomutils
Class MathVector

java.lang.Object
  extended by org.openjump.core.geomutils.MathVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MathVector
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
MathVector()
           
MathVector(com.vividsolutions.jts.geom.Coordinate coord)
           
MathVector(double x, double y)
           
 
Method Summary
 MathVector add(MathVector vector)
           
 double angleDeg(MathVector vector)
           
 double angleRad(MathVector vector)
           
 java.lang.Object clone()
           
 double distance(MathVector vector)
           
 double dot(MathVector vector)
           
 boolean equals(java.lang.Object object)
           
 com.vividsolutions.jts.geom.Coordinate getCoord()
           
 double magnitude()
           
 MathVector rotateDeg(double angle)
           
 MathVector rotateRad(double angle)
           
 MathVector scale(double number)
           
 java.lang.String toString()
           
 MathVector unit()
           
 MathVector vectorBetween(MathVector vector)
           
 double x()
           
 double y()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MathVector

public MathVector()

MathVector

public MathVector(com.vividsolutions.jts.geom.Coordinate coord)

MathVector

public MathVector(double x,
                  double y)
Method Detail

x

public double x()

y

public double y()

getCoord

public com.vividsolutions.jts.geom.Coordinate getCoord()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

magnitude

public double magnitude()

add

public MathVector add(MathVector vector)

scale

public MathVector scale(double number)

unit

public MathVector unit()

dot

public double dot(MathVector vector)

distance

public double distance(MathVector vector)

vectorBetween

public MathVector vectorBetween(MathVector vector)

angleRad

public double angleRad(MathVector vector)

angleDeg

public double angleDeg(MathVector vector)

rotateDeg

public MathVector rotateDeg(double angle)

rotateRad

public MathVector rotateRad(double angle)