From 95d3c4020f9871f3520e29d314c8ae6b3b42f9eb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 30 Jun 2013 03:47:43 +0200 Subject: Quaternion: Fix float type - double epsilon slipped through review, where we like to compare float values - remove 64bit conversion. --- src/jogl/classes/com/jogamp/opengl/math/Quaternion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java index d5ffe2da4..f1a3f8be2 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java +++ b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java @@ -403,7 +403,7 @@ public class Quaternion { * @return true if representing a rotational matrix, false otherwise */ public boolean isRotationMatrix(float[] m) { - final double epsilon = 0.01; // margin to allow for rounding errors + final float epsilon = 0.01f; // margin to allow for rounding errors if (FloatUtil.abs(m[0] * m[3] + m[3] * m[4] + m[6] * m[7]) > epsilon) return false; if (FloatUtil.abs(m[0] * m[2] + m[3] * m[5] + m[6] * m[8]) > epsilon) @@ -421,6 +421,6 @@ public class Quaternion { private float determinant(float[] m) { return m[0] * m[4] * m[8] + m[3] * m[7] * m[2] + m[6] * m[1] * m[5] - - m[0] * m[7] * m[5] - m[3] * m[1] * m[8] - m[6] * m[4] * m[2]; + - m[0] * m[7] * m[5] - m[3] * m[1] * m[8] - m[6] * m[4] * m[2]; } } -- cgit v1.2.3