Resolution: Won't Fix
Affects Version/s: 3.6.1
Fix Version/s: 4.0
Constructing a Rotation object from a rotation matrix and extracting the quaternion gives the inverse of the expected quaternion.
E.g. something like this:
results in q being the inverse of what is expected.
I tracked this down to Rotation#mat2quat(final double) which seems to access the matrix elements as if they were stored transposed. E.g. compare with Quat4f#set(Matrix3f):
I compared the result from Commons Math with JavaFX, JavaX Vecmath and NumPy + http://www.lfd.uci.edu/~gohlke/code/transformations.py.html. All but Commons Math agree on the result.
You can find my test program here: http://pastebin.com/jxwFi9mt
It prints the following output (Python results added manually):
The other constructor using mat2quat() is probably also affected although I did not verify this.