Package org.openjump.core.geomutils
Class MathVector
- java.lang.Object
-
- org.openjump.core.geomutils.MathVector
-
- All Implemented Interfaces:
Serializable,Cloneable
public class MathVector extends Object implements Cloneable, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MathVector()MathVector(double x, double y)MathVector(org.locationtech.jts.geom.Coordinate coord)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MathVectoradd(MathVector vector)doubleangleDeg(MathVector vector)doubleangleRad(MathVector vector)Objectclone()doubledistance(MathVector vector)doubledot(MathVector vector)booleanequals(Object object)org.locationtech.jts.geom.CoordinategetCoord()doublemagnitude()MathVectorrotateDeg(double angle)MathVectorrotateRad(double angle)MathVectorscale(double number)StringtoString()MathVectorunit()MathVectorvectorBetween(MathVector vector)doublex()doubley()
-
-
-
Method Detail
-
x
public double x()
-
y
public double y()
-
getCoord
public org.locationtech.jts.geom.Coordinate getCoord()
-
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)
-
-