net.sourceforge.arbaro.transformation
Class Vector
java.lang.Object
net.sourceforge.arbaro.transformation.Vector
public final class Vector
- extends java.lang.Object
A x,y,z-vector class
- Author:
- Wolfram Diestel
Constructor Summary |
Vector()
|
Vector(double x,
double y,
double z)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
X_AXIS
public static final Vector X_AXIS
Y_AXIS
public static final Vector Y_AXIS
Z_AXIS
public static final Vector Z_AXIS
Vector
public Vector()
Vector
public Vector(double x,
double y,
double z)
equals
public boolean equals(Vector v)
abs
public double abs()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
normalize
public Vector normalize()
getX
public double getX()
getY
public double getY()
getZ
public double getZ()
mul
public Vector mul(double factor)
prod
public double prod(Vector v)
div
public Vector div(double factor)
add
public Vector add(Vector v)
sub
public Vector sub(Vector v)
atan2
public static double atan2(double v,
double u)
- Returns the angle of a 2-dimensional vector (u,v) with the u-axis
- Parameters:
v
- v-coordinate of the vectoru
- u-coordinate of the vector
- Returns:
- a value from (-180..180)
setMaxCoord
public void setMaxCoord(Vector v)
setMinCoord
public void setMinCoord(Vector v)