Contains the Vec2 structure with functions and overloaded operators.
More...
#include <Vec2.h>
Contains the Vec2 structure with functions and overloaded operators.
◆ Vec2() [1/3]
Constructs the Vec2 setting the values to 0,0.
◆ Vec2() [2/3]
Vec2::Vec2 |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inline |
Constructs the Vec2 setting the values to the input coordinates.
- Parameters
-
x | The inputed x position. |
y | The inputed y position. |
◆ Vec2() [3/3]
Vec2::Vec2 |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
Constructs the Vec2 setting the values to the input coordinates.
- Parameters
-
x | The inputed x position. |
y | The inputed y position. |
◆ getLength()
float Vec2::getLength |
( |
| ) |
|
|
inline |
Returns the length of the Vec2.
- Returns
- The length of the Vec2.
◆ operator+=()
Overloads the += operator.
- Parameters
-
- Returns
- The new vector.
◆ operator-=()
Overloads the -= operator.
- Parameters
-
- Returns
- The new vector.
The documentation for this struct was generated from the following file: