|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--taxisrus.implementation.scheduler_stuff.Vector2D
Two dimensional representation of a point.
| Constructor Summary | |
Vector2D()
Default constructor, sets the object to have coordinate 0,0 |
|
Vector2D(float x,
float y)
Constructor, sets the object to have coordinate x,y |
|
| Method Summary | |
Vector2D |
Add(Vector2D vec)
Two dimensional vector addition. |
Vector2D |
Divide(float scalar)
Two dimensional vector division. |
float |
DotProduct(Vector2D vec)
Calculates the mathematical dot product of two two dimensional vectors. |
boolean |
equals(Object obj)
Overrides Object's equals function |
float |
GetCrossProduct(Vector2D vec)
|
Vector2D |
GetNormal()
|
float |
GetX()
Gets the x component of the vector. |
float |
GetY()
Gets the y component of the vector. |
float |
Length()
Calculates the distance between two |
Vector2D |
Multiply(float scalar)
Two dimensional vector multiplication. |
void |
Set(float x,
float y)
Sets the vector to have coordinate x,y. |
Vector2D |
Subtract(Vector2D vec)
Two dimensional vector subtraction. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Vector2D()
public Vector2D(float x,
float y)
| Method Detail |
public float GetX()
public float GetY()
public void Set(float x,
float y)
public float DotProduct(Vector2D vec)
public float Length()
public Vector2D GetNormal()
public float GetCrossProduct(Vector2D vec)
public Vector2D Add(Vector2D vec)
public Vector2D Subtract(Vector2D vec)
public Vector2D Multiply(float scalar)
public Vector2D Divide(float scalar)
public boolean equals(Object obj)
equals in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||