summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPetr Skramovsky <[email protected]>2013-06-04 22:21:36 +0200
committerPetr Skramovsky <[email protected]>2013-06-05 13:34:13 +0200
commita368548b20321ea5cdace6cc495e632ca9d5c99c (patch)
tree05b99f1f071e4f7c784b501a50eb3c64a51d6f5a /src
parent08bfa5797069cb5757620e74b8befaa079d04ddb (diff)
Quaternion.java : fixed not clear assignment
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/Quaternion.java5
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);
}
/**