File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,9 @@ template <isQuantity T> class Vector2D {
65
65
* @param other vector to add
66
66
* @return Vector2D<T>
67
67
*/
68
- constexpr Vector2D<T> operator +(const Vector2D<T>& other) const { return Vector2D<T>(x + other.x , y + other.y ); }
68
+ constexpr Vector2D<T> operator +(const Vector2D<T>& other) const {
69
+ return Vector2D<T>(x + other.x , y + other.y );
70
+ }
69
71
70
72
/* *
71
73
* @brief - operator overload
@@ -76,7 +78,9 @@ template <isQuantity T> class Vector2D {
76
78
* @param other vector to subtract
77
79
* @return Vector2D<T>
78
80
*/
79
- constexpr Vector2D<T> operator -(const Vector2D<T>& other) const { return Vector2D<T>(x - other.x , y - other.y ); }
81
+ constexpr Vector2D<T> operator -(const Vector2D<T>& other) const {
82
+ return Vector2D<T>(x - other.x , y - other.y );
83
+ }
80
84
81
85
/* *
82
86
* @brief * operator overload
@@ -231,7 +235,9 @@ template <isQuantity T> class Vector2D {
231
235
* @param other the other vector
232
236
* @return T
233
237
*/
234
- constexpr T distanceTo (const Vector2D<T>& other) const { return sqrt (square (x - other.x , 2 ) + square (y - other.y , 2 )); }
238
+ constexpr T distanceTo (const Vector2D<T>& other) const {
239
+ return sqrt (square (x - other.x , 2 ) + square (y - other.y , 2 ));
240
+ }
235
241
236
242
/* *
237
243
* @brief normalize the vector
You can’t perform that action at this time.
0 commit comments