Public Member Functions | |
| Vector2D () | |
| Vector2D (double _x, double _y) | |
| double | getX () |
| double | getY () |
| double | magnitude () |
Static Public Member Functions | |
| static Point2D | add (Point2D p, Vector2D v) |
| Adds a vector to a point, resulting in a new point. | |
| static Vector2D | add (Vector2D a, Vector2D b) |
| static Vector2D | getNormalized (Vector2D v) |
| static Vector2D | getScaled (double desiredMagnitude, Vector2D v) |
| static Vector2D | multiply (double d, Vector2D vector2D) |
| static Vector2D | subtract (Point2D a, Point2D b) |
| Returns a - b. | |
Definition at line 16 of file Vector2D.java.
| Vector2D | ( | double | _x, | |
| double | _y | |||
| ) |
| a | ||
| b |
Definition at line 36 of file Vector2D.java.
References Vector2D.Vector2D(), Vector2D.x, and Vector2D.y.
| static Point2D add | ( | Point2D | p, | |
| Vector2D | v | |||
| ) | [static] |
Adds a vector to a point, resulting in a new point.
| p | ||
| v |
Definition at line 25 of file Vector2D.java.
References Vector2D.x, and Vector2D.y.
| desiredMagnitude |
Definition at line 54 of file Vector2D.java.
References Vector2D.magnitude(), Vector2D.Vector2D(), Vector2D.x, and Vector2D.y.
Referenced by Vector2D.getNormalized().
| double getY | ( | ) |
| double magnitude | ( | ) |
| d | ||
| vector2D |
Definition at line 66 of file Vector2D.java.
References Vector2D.Vector2D(), Vector2D.x, and Vector2D.y.
| static Vector2D subtract | ( | Point2D | a, | |
| Point2D | b | |||
| ) | [static] |
Returns a - b.
| a | ||
| b |
Definition at line 77 of file Vector2D.java.
References Vector2D.Vector2D(), Vector2D.x, and Vector2D.y.
1.4.7