fix for quaternion::toAngleAxis, angle was QNaN when W < -1
git-svn-id: http://svn.code.sf.net/p/irrlicht/code/trunk@758 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
e9e8d4b01b
commit
2c14c00a58
@ -473,7 +473,7 @@ inline void quaternion::toAngleAxis(f32 &angle, core::vector3df &axis) const
|
|||||||
{
|
{
|
||||||
f32 scale = sqrt (X*X + Y*Y + Z*Z);
|
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;
|
angle = 0.0f;
|
||||||
axis.X = 0.0f;
|
axis.X = 0.0f;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user