a Vector2 class
More...
#include <Vector.hpp>
template<typename T>
class GameEngine::Vector2< T >
a Vector2 class
- Template Parameters
-
T | the type contained in the vector |
◆ Vector2() [1/2]
◆ Vector2() [2/2]
constructor
- Parameters
-
x | value of the vector |
y | value of the vector |
◆ ~Vector2()
◆ dotProduct()
calculate the dot product of the vector
- Parameters
-
vec | the vector to calculate the dot product with |
- Returns
- the dot product
◆ length()
calculate the length of the vector
- Returns
- the length of the vector
◆ normalize()
normalize the vector
- Returns
- a normalized copy of the vector
◆ operator!=()
overload operator != to compare two Vector2
- Parameters
-
- Returns
- a boolean for the comparison
◆ operator*()
overload of the * operator
- Parameters
-
- Returns
- result of the multiplication
◆ operator*=()
overload of the *= operator
- Parameters
-
- Returns
- reference to vector
◆ operator+()
overload of the + operator
- Parameters
-
vec | the vector to add with |
- Returns
- the vector resulting of the addition
◆ operator+=()
overload of the += operator
- Parameters
-
vec | the vector to add with |
- Returns
- the vector resulting of the addition
◆ operator-()
overload of the - operator
- Parameters
-
vec | the vector to subtract with |
- Returns
- the vector resulting of the subtraction
◆ operator-=()
overload of the -= operator
- Parameters
-
vec | the vector to subtract with |
- Returns
- result of the subtraction
◆ operator/()
overload of the / operator
- Parameters
-
- Returns
- result of the division
◆ operator/=()
overload of the /= operator
- Parameters
-
- Returns
- reference to vector
◆ operator==()
overload operator == to compare two Vector2
- Parameters
-
- Returns
- a boolean for the comparison
The documentation for this class was generated from the following file: