From 6aaca0f31eb25938ffab92dd19ffcaacbe5768d9 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Fri, 18 Oct 2013 00:26:18 -0700 Subject: jogl: allow short-circuited comparison in comparison For this case && and & work equivalently, but using && allows the second comparison to be omitted if the first comparison is false. Likely just a typo. Signed-off-by: Harvey Harrison --- src/jogl/classes/com/jogamp/opengl/math/Quaternion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java index 78cbb18cf..52a59c599 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java +++ b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java @@ -361,7 +361,7 @@ public class Quaternion { y = (m[6] - m[2]) * S; z = (m[1] - m[3]) * S; } else { - if ((m[0] > m[4]) & (m[0] > m[8])) { + if ((m[0] > m[4]) && (m[0] > m[8])) { final float S = FloatUtil.sqrt(1.0f + m[0] - m[4] - m[8]) * 2f; // S=4*qx w = (m[7] - m[5]) / S; x = 0.25f * S; -- cgit v1.2.3