org.openjump.core.geomutils
Class MathVector
java.lang.Object
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
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MathVector
public MathVector()
MathVector
public MathVector(com.vividsolutions.jts.geom.Coordinate coord)
MathVector
public MathVector(double x,
double y)
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)