diff options
author | Petr Skramovsky <[email protected]> | 2013-06-04 22:21:36 +0200 |
---|---|---|
committer | Petr Skramovsky <[email protected]> | 2013-06-05 13:34:13 +0200 |
commit | a368548b20321ea5cdace6cc495e632ca9d5c99c (patch) | |
tree | 05b99f1f071e4f7c784b501a50eb3c64a51d6f5a /src/jogl/classes | |
parent | 08bfa5797069cb5757620e74b8befaa079d04ddb (diff) |
Quaternion.java : fixed not clear assignment
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/math/Quaternion.java | 5 |
1 files changed, 3 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 65594a50e..409176101 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java +++ b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java @@ -77,12 +77,13 @@ public class Quaternion { * @param angle rotation angle (rads) */ public void fromAxis(float[] vector, float angle) { - float sin = FloatUtil.sin(angle *= 0.5f); + float halfangle = angle * 0.5f; + float sin = FloatUtil.sin(halfangle); float[] nv = VectorUtil.normalize(vector); x = (nv[0] * sin); y = (nv[1] * sin); z = (nv[2] * sin); - w = FloatUtil.cos(angle); + w = FloatUtil.cos(halfangle); } /** |