frykauf / o3d

Automatically exported from code.google.com/p/o3d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

o3djs.quaternions.rotationToQuaternion returns [NaN NaN,0,NaN] when applied to identity matrix

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. feeding [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]] to rotationToQuaternion

What is the expected output? What do you see instead?
[0,0,0,1]
I see
[Nan,Nan,0,Nan]

What version of the product are you using? On what operating system?
svn head

Additional information:
the correct algorithm should look more like (attached)
The attached algorithm has not be carefully tested in a wide variety of 
situations, but it seems to do well on the small stuff tested so far


Original issue reported on code.google.com by danie...@gmail.com on 12 Jun 2010 at 5:54

Attachments: