Commit 569dc835 authored by bitplane's avatar bitplane

fix for quaternion::toAngleAxis, angle was QNaN when W < -1

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@758 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5f21bbf8
......@@ -473,7 +473,7 @@ inline void quaternion::toAngleAxis(f32 &angle, core::vector3df &axis) const
{
f32 scale = sqrt (X*X + Y*Y + Z*Z);
if (core::equals(scale,0.0f) || W > 1.0f)
if (core::equals(scale,0.0f) || W > 1.0f || W < -1.0f)
{
angle = 0.0f;
axis.X = 0.0f;
......
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