lab4
Class Vector
java.lang.Object
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Vector
public Vector(double dx,
double dy)
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)