"include/svn:/svn.code.sf.net/p/irrlicht/code/trunk@4791" did not exist on "1fa2ba2b6103bd62983298e2ba05c908d43e4c7c"
Commit ae3d7a58 authored by hybrid's avatar hybrid

Fixed also the vector2d normalization, reported by prisonerofpain.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@707 dfc29bdd-3216-0410-991c-e03cc46cb475
parent fee87ba4
......@@ -112,14 +112,10 @@ public:
//! normalizes the vector.
vector2d<T>& normalize()
{
T l = core::reciprocal_squareroot ( X*X + Y*Y );
/*
T l = (T)getLength();
T l = X*X + Y*Y;
if (l == 0)
return *this;
l = (T)1.0 / l;
*/
l = core::reciprocal_squareroot ( (f32)l );
X *= l;
Y *= l;
return *this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment