Skip to content

Commit 224839b

Browse files
committed
fix vector2d::distanceTo
1 parent ec18dd0 commit 224839b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/units/Vector2D.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ template <isQuantity T> class Vector2D {
228228
* @return T
229229
*/
230230
constexpr T distanceTo(const Vector2D<T>& other) const {
231-
return sqrt(square(this->x - other.x, 2) + square(this->y - other.y, 2));
231+
return sqrt(square(this->x - other.x) + square(this->y - other.y));
232232
}
233233

234234
/**

0 commit comments

Comments
 (0)