|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A vector in two space.
| Method Summary | |
|---|---|
double |
getAngle()
Get the angle of this vector from the origin. |
double |
getRadius()
Get the radius of this vector. |
double |
getX()
Get the X coordinate of this vector. |
double |
getY()
Get the Y coordinate of this vector. |
Vec2D |
rotate(double angle)
Rotate this vector for some amount around the origin. |
Vec2D |
stretch(double factor)
Stretch this vector by some amount. |
java.lang.String |
toString()
Convert this vector to a string. |
Vec2D |
unitVector()
Compute the unit vector for this vector (radius 1, same angle). |
| Method Detail |
public double getX()
public double getY()
public double getAngle()
public double getRadius()
public Vec2D rotate(double angle)
public Vec2D stretch(double factor)
public Vec2D unitVector()
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||