Explorar o código

Merge pull request #183 from Acclution/master

Fix issue where Vector2::normalize() did not normalize correctly
Bastiaan Olij %!s(int64=7) %!d(string=hai) anos
pai
achega
f52cc4c964
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 	}