Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
SizzinSeal committed Dec 28, 2024
1 parent ec38df6 commit 9e9bc7d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions include/units/Vector2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ template <isQuantity T> class Vector2D {
* @param other vector to add
* @return Vector2D<T>
*/
constexpr Vector2D<T> operator+(const Vector2D<T>& other) const { return Vector2D<T>(x + other.x, y + other.y); }
constexpr Vector2D<T> operator+(const Vector2D<T>& other) const {
return Vector2D<T>(x + other.x, y + other.y);
}

/**
* @brief - operator overload
Expand All @@ -76,7 +78,9 @@ template <isQuantity T> class Vector2D {
* @param other vector to subtract
* @return Vector2D<T>
*/
constexpr Vector2D<T> operator-(const Vector2D<T>& other) const { return Vector2D<T>(x - other.x, y - other.y); }
constexpr Vector2D<T> operator-(const Vector2D<T>& other) const {
return Vector2D<T>(x - other.x, y - other.y);
}

/**
* @brief * operator overload
Expand Down Expand Up @@ -231,7 +235,9 @@ template <isQuantity T> class Vector2D {
* @param other the other vector
* @return T
*/
constexpr T distanceTo(const Vector2D<T>& other) const { return sqrt(square(x - other.x, 2) + square(y - other.y, 2)); }
constexpr T distanceTo(const Vector2D<T>& other) const {
return sqrt(square(x - other.x, 2) + square(y - other.y, 2));
}

/**
* @brief normalize the vector
Expand Down

0 comments on commit 9e9bc7d

Please sign in to comment.