summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2018-09-09 17:59:39 +1000
committerGitHub <noreply@github.com>2018-09-09 17:59:39 +1000
commitf52cc4c9648b19c2b79ae49d68f0966ab4ccb26b (patch)
tree62aee8d4f1c3d6a73d2cf23399b58ba0859ed789 /src
parent72d227dd1c2dc8a7efc2ea18e7119d44743a8a9c (diff)
parentffb087caedbf1848f4eb8abbf7fa5df8255cdfec (diff)
downloadredot-cpp-f52cc4c9648b19c2b79ae49d68f0966ab4ccb26b.tar.gz
Merge pull request #183 from Acclution/master
Fix issue where Vector2::normalize() did not normalize correctly
Diffstat (limited to 'src')
-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;
}