aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-09 08:25:30 +0200
committerSven Gothel <[email protected]>2014-04-09 08:25:30 +0200
commit0234452455511713fcbfd5df1987c3958cca781b (patch)
treeb629c11396262acce55e360c8e3379b60d7ac906 /src/jogl
parent56bd8f3007005ecbf31a19b6a02788b33910c90b (diff)
Fix Quaternion.rotateByEuler(..): Zero rotation shall lead to NOP instead of setting identity
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/Quaternion.java4
1 files changed, 2 insertions, 2 deletions
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 {
* <p>
* Implementation Details:
* <ul>
- * <li> {@link #setIdentity()} if all angles are {@link FloatUtil#isZero(float, float) is zero} using {@link FloatUtil#EPSILON epsilon}</li>
+ * <li> NOP if all angles are {@link FloatUtil#isZero(float, float) is zero} using {@link FloatUtil#EPSILON epsilon}</li>
* <li> result is {@link #normalize()}ed</li>
* </ul>
* </p>
@@ -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