diff options
author | Sven Gothel <[email protected]> | 2013-06-30 03:47:43 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-06-30 03:47:43 +0200 |
commit | 95d3c4020f9871f3520e29d314c8ae6b3b42f9eb (patch) | |
tree | bae5f333784f616165e6dedfe19b4b7ca5e21365 /src | |
parent | 7ed12d91ade9af406d1cec7772bc4c9f0f988fa7 (diff) |
Quaternion: Fix float type - double epsilon slipped through review, where we like to compare float values - remove 64bit conversion.
Diffstat (limited to 'src')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/math/Quaternion.java | 4 |
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 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]; } } |