Class Vector
java.lang.Object
Vector
public class Vector
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ZERO
public static final Vector ZERO
getX
public double getX()
getY
public double getY()
getZ
public double getZ()
getLengthSquared
public double getLengthSquared()
getLength
public double getLength()
normalize
public Vector normalize()
dot
public double dot(Vector other)
cross
public Vector cross(Vector other)
add
public Vector add(Vector other)
subtract
public Vector subtract(Vector other)
projectOnto
public Vector projectOnto(Vector other)
scale
public Vector scale(double scalar)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
create
public static Vector create(double x,
double y,
double z)