diff options
author | Bastiaan Olij <mux213@gmail.com> | 2018-09-09 17:59:39 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-09 17:59:39 +1000 |
commit | f52cc4c9648b19c2b79ae49d68f0966ab4ccb26b (patch) | |
tree | 62aee8d4f1c3d6a73d2cf23399b58ba0859ed789 /src | |
parent | 72d227dd1c2dc8a7efc2ea18e7119d44743a8a9c (diff) | |
parent | ffb087caedbf1848f4eb8abbf7fa5df8255cdfec (diff) | |
download | redot-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.cpp | 2 |
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; } |