Vec2 will abstract X&Y position for ball and paddle.
More...
#include <Vec2.h>
|
| Vec2 () |
| Default constructor for Vec2() class. More...
|
|
| Vec2 (float x, float y) |
| Overloaded constructor that takes in two arguments. More...
|
|
Vec2 | operator+ (Vec2 const &rhs) |
| This method is overloading the + operator to make it easier for us to calculate in certain scenario. More...
|
|
Vec2 & | operator+= (Vec2 const &rhs) |
| This method is overloading the += operator to make it easier for us to calculate in certain scenario. More...
|
|
Vec2 | operator* (float) |
| This method is overloading the * operator to make it easier for us to calculate in certain scenario. More...
|
|
Vec2 will abstract X&Y position for ball and paddle.
◆ Vec2() [1/2]
Default constructor for Vec2() class.
◆ Vec2() [2/2]
Vec2::Vec2 |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
Overloaded constructor that takes in two arguments.
- Parameters
-
x | The x Coordinate |
y | The Y Coordinate |
◆ operator*()
Vec2 Vec2::operator* |
( |
float |
rhs | ) |
|
This method is overloading the * operator to make it easier for us to calculate in certain scenario.
- Parameters
-
rhs | The right hand side of the calculation |
- Returns
- returns a Vec2 object
◆ operator+()
Vec2 Vec2::operator+ |
( |
Vec2 const & |
rhs | ) |
|
This method is overloading the + operator to make it easier for us to calculate in certain scenario.
- Parameters
-
rhs | The right hand side of the calculation |
- Returns
- returns a Vec2 object
◆ operator+=()
Vec2 & Vec2::operator+= |
( |
Vec2 const & |
rhs | ) |
|
This method is overloading the += operator to make it easier for us to calculate in certain scenario.
- Parameters
-
rhs | The right hand side of the calculation |
- Returns
- returns a reference to a Vec2 object
The documentation for this class was generated from the following files: