The line 324 in file "OpenGL.Net/Quaternion.cs" currently reads:
double _q2 = w1*y2 + y1*w2 + x1*z2 - z1*x2;
but I believe it should be:
double _q2 = w1*y2 + y1*w2 + z1*x2 - x1*z2;
i.e., the last two terms (x1*z2 and z1*x2) are tangled.
I'm not a math guru and can't provide a good test case. I just noticed some strange rotation behaviour in my program run on OpenGL.Net (thank you for the great program, by the way!), and my trouble shooting finally came to the quaternion multiplication. The above change solved my issue. Can you please check it against your source of the quaternion formula.
The line 324 in file "OpenGL.Net/Quaternion.cs" currently reads:
double _q2 = w1*y2 + y1*w2 + x1*z2 - z1*x2;
but I believe it should be:
double _q2 = w1*y2 + y1*w2 + z1*x2 - x1*z2;
i.e., the last two terms (
x1*z2
andz1*x2
) are tangled.I'm not a math guru and can't provide a good test case. I just noticed some strange rotation behaviour in my program run on OpenGL.Net (thank you for the great program, by the way!), and my trouble shooting finally came to the quaternion multiplication. The above change solved my issue. Can you please check it against your source of the quaternion formula.