Browse Source

Fix issue where Vector2::normalize() did not normalize correctly

Christoffer 7 years ago
parent
commit
ffb087caed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Vector2.cpp

+ 1 - 1
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;
 	}