public class MathVector
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
MathVector() |
MathVector(com.vividsolutions.jts.geom.Coordinate coord) |
MathVector(double x,
double y) |
Modifier and Type | Method and Description |
---|---|
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() |
public MathVector()
public MathVector(com.vividsolutions.jts.geom.Coordinate coord)
public MathVector(double x, double y)
public double x()
public double y()
public com.vividsolutions.jts.geom.Coordinate getCoord()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public double magnitude()
public MathVector add(MathVector vector)
public MathVector scale(double number)
public MathVector unit()
public double dot(MathVector vector)
public double distance(MathVector vector)
public MathVector vectorBetween(MathVector vector)
public double angleRad(MathVector vector)
public double angleDeg(MathVector vector)
public MathVector rotateDeg(double angle)
public MathVector rotateRad(double angle)