lab4
Class Vector

java.lang.Object
  extended by lab4.Vector

public class Vector
extends java.lang.Object

Name: Lab Section: Date: Vector.java CSE 131 Lab 4


Constructor Summary
Vector(double dx, double dy)
           
 
Method Summary
 Vector deflectX()
           
 Vector deflectY()
           
 double getDeltaX()
           
 double getDeltaY()
           
 double magnitude()
           
 Vector minus(Vector other)
           
 Vector plus(Vector other)
           
 Vector rescale(double magnitude)
           
 Vector scale(double factor)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vector

public Vector(double dx,
              double dy)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDeltaX

public double getDeltaX()

getDeltaY

public double getDeltaY()

magnitude

public double magnitude()

deflectX

public Vector deflectX()

deflectY

public Vector deflectY()

plus

public Vector plus(Vector other)

minus

public Vector minus(Vector other)

scale

public Vector scale(double factor)

rescale

public Vector rescale(double magnitude)