|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--roboplayer.geometry.Vector2d
Helper class for different vector functions.
| Field Summary | |
double |
x
|
double |
y
|
| Constructor Summary | |
Vector2d()
Empty constructor |
|
Vector2d(double posx,
double posy)
Constructor |
|
Vector2d(Vector2d v)
Copy constructor |
|
| Method Summary | |
void |
add(Vector2d pos)
Add vector |
double |
getDistance(Vector2d second)
Get distance to second vector |
double |
getLength()
Get length of this vector |
void |
multiply(double scalar)
Multiply by scalar |
java.lang.String |
toString()
Convert to string |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double x
public double y
| Constructor Detail |
public Vector2d()
public Vector2d(double posx,
double posy)
posx - x coordinateposy - y coordinatepublic Vector2d(Vector2d v)
v - source vector| Method Detail |
public void add(Vector2d pos)
pos - vector to addpublic void multiply(double scalar)
scalar - scalarpublic double getLength()
public double getDistance(Vector2d second)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||