From ffb087caedbf1848f4eb8abbf7fa5df8255cdfec Mon Sep 17 00:00:00 2001 From: Christoffer Date: Mon, 3 Sep 2018 19:19:56 +0200 Subject: [PATCH] Fix issue where Vector2::normalize() did not normalize correctly --- src/core/Vector2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Vector2.cpp b/src/core/Vector2.cpp index ecb7378..379af9e 100644 --- a/src/core/Vector2.cpp +++ b/src/core/Vector2.cpp @@ -81,7 +81,7 @@ void Vector2::normalize() { real_t l = x*x + y*y; if (l != 0) { - l = (l); + l = sqrt(l); x /= l; y /= l; }