summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoffer <github@acclution.se>2018-09-03 19:19:56 +0200
committerChristoffer <github@acclution.se>2018-09-03 19:19:56 +0200
commitffb087caedbf1848f4eb8abbf7fa5df8255cdfec (patch)
tree62aee8d4f1c3d6a73d2cf23399b58ba0859ed789
parent72d227dd1c2dc8a7efc2ea18e7119d44743a8a9c (diff)
downloadredot-cpp-ffb087caedbf1848f4eb8abbf7fa5df8255cdfec.tar.gz
Fix issue where Vector2::normalize() did not normalize correctly
-rw-r--r--src/core/Vector2.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}