From 0234452455511713fcbfd5df1987c3958cca781b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 9 Apr 2014 08:25:30 +0200 Subject: Fix Quaternion.rotateByEuler(..): Zero rotation shall lead to NOP instead of setting identity --- src/jogl/classes/com/jogamp/opengl/math/Quaternion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/com/jogamp') diff --git a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java index 345224788..93f13a34c 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java +++ b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java @@ -427,7 +427,7 @@ public class Quaternion { *

* Implementation Details: *

*

@@ -442,7 +442,7 @@ public class Quaternion { */ public final Quaternion rotateByEuler(final float bankX, final float headingY, float attitudeZ) { if ( VectorUtil.isZero(bankX, headingY, attitudeZ, FloatUtil.EPSILON) ) { - return setIdentity(); + return this; } else { // setFromEuler muls: ( 8 + 4 ) , + quat muls 24 = 36 // this: 8 + 8 + 8 + 4 = 28 muls -- cgit v1.2.3