Closed jimsynz closed 6 years ago
That may well be a bug--thank you for your observation!
Could you see if this behavior occurs using unit quaternions as well?
It looks your hunch is right:
iex> Graphmath.Quatern.create(0.978015, 0.135224, 0.137461, 0.0794041)
...> |> Graphmath.Quatern.to_rotation_matrix()
...> |> Graphmath.Quatern.from_rotation_matrix()
{0.9780153026441815, 0.13522395815530017, 0.13746095746306655,
0.07940407542861673}
Good to see that that was right!
I'm half-tempted to require enforcement of unit quaternions all along the pipeline, as per some discussion here. Any thoughts?
Your call :)
So, for the moment, I'll let this lie. Let me know if you're having any further problems. :)
Unless I'm wrong, converting to a rotation matrix and back should be reversible, right?
So it looks like the elements of the quatern tuple are being reversed. Is this a bug?