Merge pull request #183 from Acclution/master
Fix issue where Vector2::normalize() did not normalize correctly
This commit is contained in:
commit
f52cc4c964
@ -81,7 +81,7 @@ void Vector2::normalize()
|
|||||||
{
|
{
|
||||||
real_t l = x*x + y*y;
|
real_t l = x*x + y*y;
|
||||||
if (l != 0) {
|
if (l != 0) {
|
||||||
l = (l);
|
l = sqrt(l);
|
||||||
x /= l;
|
x /= l;
|
||||||
y /= l;
|
y /= l;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user