11 Vector2D::Vector2D() {};
13 Vector2D::Vector2D(
double newX,
double newY) : x(newX), y(newY) {}
39 stream <<
"(" << vector.
x <<
", " << vector.
y <<
")";
Vector2D operator+(const Vector2D &other) const
void operator+=(const Vector2D &other)
void operator=(const Vector2D &other)
void operator*=(double factor)
Representation of a vector.
friend ostream & operator<<(ostream &stream, Vector2D &vector)
double y
The 'y' component of the Vector2D.
double x
The 'x' component of the Vector2D.
All the game logic of the Arkanoid game.
Vector2D operator*(double factor) const