diff options
author | Petr Skramovsky <[email protected]> | 2013-06-04 22:21:36 +0200 |
---|---|---|
committer | Petr Skramovsky <[email protected]> | 2013-06-04 22:21:36 +0200 |
commit | 6319878549d3f2e7046959b262b536ecf292be27 (patch) | |
tree | 05b99f1f071e4f7c784b501a50eb3c64a51d6f5a /src/jogl/classes/com/jogamp | |
parent | ba8f322de06204afe4c7cb81e51a1d46477bb586 (diff) |
Quaternion.java : fixed not clear assignment
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-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); } /** |