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: ...@@ -112,14 +112,10 @@ public:
//! normalizes the vector. //! normalizes the vector.
vector2d<T>& normalize() vector2d<T>& normalize()
{ {
T l = core::reciprocal_squareroot ( X*X + Y*Y ); T l = X*X + Y*Y;
/*
T l = (T)getLength();
if (l == 0) if (l == 0)
return *this; return *this;
l = core::reciprocal_squareroot ( (f32)l );
l = (T)1.0 / l;
*/
X *= l; X *= l;
Y *= l; Y *= l;
return *this; 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