* Mathematic representation of a 2D vector of floats */
| 13 | * Mathematic representation of a 2D vector of floats |
| 14 | */ |
| 15 | struct FVector2 |
| 16 | { |
| 17 | static const FVector2 One; |
| 18 | static const FVector2 Zero; |
| 19 | |
| 20 | float x; |
| 21 | float y; |
| 22 | |
| 23 | /** |
| 24 | * Default constructor |
| 25 | * @param p_x |
| 26 | * @param p_y |
| 27 | */ |
| 28 | FVector2(float p_x = 0.0f, float p_y = 0.0f); |
| 29 | |
| 30 | /** |
| 31 | * Copy constructor |
| 32 | * @param p_toCopy |
| 33 | */ |
| 34 | FVector2(const FVector2& p_toCopy); |
| 35 | |
| 36 | /** |
| 37 | * Move constructor |
| 38 | * @param p_toMove |
| 39 | */ |
| 40 | FVector2(FVector2&& p_toMove) noexcept = default; |
| 41 | |
| 42 | /** |
| 43 | * Negation |
| 44 | */ |
| 45 | FVector2 operator-() const; |
| 46 | |
| 47 | /** |
| 48 | * Copy assignment |
| 49 | * @param p_other |
| 50 | */ |
| 51 | FVector2 operator=(const FVector2& p_other); |
| 52 | |
| 53 | /** |
| 54 | * Calculate the sum of two vectors |
| 55 | * @param p_other |
| 56 | */ |
| 57 | FVector2 operator+(const FVector2& p_other) const; |
| 58 | |
| 59 | /** |
| 60 | * Add the right vector to the left one |
| 61 | * @param p_other |
| 62 | */ |
| 63 | FVector2& operator+=(const FVector2& p_other); |
| 64 | |
| 65 | /** |
| 66 | * Calculate the substraction of two vectors |
| 67 | * @param p_other |
| 68 | */ |
| 69 | FVector2 operator-(const FVector2& p_other) const; |
| 70 | |
| 71 | /** |
| 72 | * Remove the right vector from the left one |
no outgoing calls
no test coverage detected