Class Vector

java.lang.Object
  extended by Vector

public class Vector
extends java.lang.Object


Field Summary
static Vector ZERO
           
 
Method Summary
 Vector add(Vector other)
           
static Vector create(double x, double y, double z)
           
 Vector cross(Vector other)
           
 double dot(Vector other)
           
 double getLength()
           
 double getLengthSquared()
           
 double getX()
           
 double getY()
           
 double getZ()
           
 Vector normalize()
           
 Vector projectOnto(Vector other)
           
 Vector scale(double scalar)
           
 Vector subtract(Vector other)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Vector ZERO
Method Detail

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)