aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/glu
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-08 12:36:13 +0200
committerSven Gothel <[email protected]>2014-07-08 12:36:13 +0200
commit109e162a78ef5bab0a7481a8499ad1da48cea094 (patch)
tree2b78799440dbd34039565af0bd15debcc3ac6b52 /src/jogl/classes/jogamp/opengl/glu
parent98053b73f1ba937108e03556456e51aa95b09b70 (diff)
Findbugs.static_final_immutable: Use final qualifier for static immutable instances.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/glu')
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
index 977881e6b..a6952ec5a 100644
--- a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
@@ -119,6 +119,7 @@ import javax.media.opengl.GL;
import javax.media.opengl.glu.GLU;
import javax.media.opengl.glu.GLUquadric;
+import com.jogamp.opengl.math.FloatUtil;
import com.jogamp.opengl.util.ImmModeSink;
import com.jogamp.opengl.util.glsl.ShaderState;
@@ -375,7 +376,7 @@ public class GLUquadricImpl implements GLUquadric {
nsign = 1.0f;
}
- da = 2.0f * PI / slices;
+ da = PI_2 / slices;
dr = (topRadius - baseRadius) / stacks;
dz = height / stacks;
nz = (baseRadius - topRadius) / height;
@@ -519,7 +520,7 @@ public class GLUquadricImpl implements GLUquadric {
}
}
- da = 2.0f * PI / slices;
+ da = PI_2 / slices;
dr = (outerRadius - innerRadius) / loops;
switch (drawStyle) {
@@ -971,7 +972,7 @@ public class GLUquadricImpl implements GLUquadric {
}
drho = PI / stacks;
- dtheta = 2.0f * PI / slices;
+ dtheta = PI_2 / slices;
if (drawStyle == GLU.GLU_FILL) {
if (!textureFlag) {
@@ -1118,7 +1119,8 @@ public class GLUquadricImpl implements GLUquadric {
// Internals only below this point
//
- private static final float PI = (float)Math.PI;
+ private static final float PI = FloatUtil.PI;
+ private static final float PI_2 = 2f * FloatUtil.PI;
private static final int CACHE_SIZE = 240;
private final void glBegin(final GL gl, final int mode) {