aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTek <[email protected]>2012-11-11 02:36:39 +0100
committerSven Gothel <[email protected]>2012-11-11 02:36:39 +0100
commit944562a9600598dfa8a23f96f568fde999e1eca3 (patch)
tree97dfb7c3f1d1cc145d9807d2bd9d4c4a26b9399e /src
parent122016d1235bf80aca7dcbabece054e1a90360ee (diff)
Fix Bug 636: Quaternion multiplication unexpected behavior
Diffstat (limited to 'src')
-rwxr-xr-xsrc/jogl/classes/com/jogamp/graph/math/Quaternion.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/math/Quaternion.java b/src/jogl/classes/com/jogamp/graph/math/Quaternion.java
index adaf073e3..1e912457d 100755
--- a/src/jogl/classes/com/jogamp/graph/math/Quaternion.java
+++ b/src/jogl/classes/com/jogamp/graph/math/Quaternion.java
@@ -176,11 +176,11 @@ public class Quaternion {
*/
public void mult(Quaternion q)
{
- float w1 = w*q.w - (x*q.x + y*q.y + z*q.z);
+ float w1 = w*q.w - x*q.x - y*q.y - z*q.z;
- float x1 = w*q.z + q.w*z + y*q.z - z*q.y;
- float y1 = w*q.x + q.w*x + z*q.x - x*q.z;
- float z1 = w*q.y + q.w*y + x*q.y - y*q.x;
+ float x1 = w*q.x + x*q.w + y*q.z - z*q.y;
+ float y1 = w*q.y - x*q.z + y*q.w + x*q.x;
+ float z1 = w*q.z + x*q.y - y*q.x + y*q.w;
w = w1;
x = x1;