aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-14 15:34:55 +0100
committerSven Göthel <[email protected]>2024-02-14 15:34:55 +0100
commit716e59a9286ebf6c8a215957ab4a74a2a81315e4 (patch)
tree6d2a0be866f5c61612de60385e01d48db74a9c48 /src/demos
parentd4d4a797ab0e53db59dac1ea915825845861667e (diff)
Use FloatUtil.isZero(a) w/ build-in FloatUtil.EPSILON directly instead of passing FloatUtil.EPSILON to explicit isZero(a, epsilon)
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
index dfd6f55e7..47c84c914 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
@@ -968,7 +968,7 @@ public class UISceneDemo20 implements GLEventListener {
} else {
System.err.println("Using default DPI of "+dpiV);
}
- if( 0 == renderModes && !FloatUtil.isZero(noAADPIThreshold, FloatUtil.EPSILON)) {
+ if( 0 == renderModes && !FloatUtil.isZero(noAADPIThreshold)) {
final boolean noAA = dpiV >= noAADPIThreshold;
final String noAAs = noAA ? " >= " : " < ";
System.err.println("AUTO RenderMode: dpi "+dpiV+noAAs+noAADPIThreshold+" -> noAA "+noAA);
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
index 834686bc2..a32606104 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
@@ -424,7 +424,7 @@ public class UIShapeDemo01 implements GLEventListener {
// final float[] translate = crossHair.getTranslate();
// final float[] objPosT = new float[] { objPosC[0]+translate[0], objPosC[1]+translate[1], objPosC[2]+translate[2] };
final Vec3f diff = winObjPos.minus(objPosC);
- if( !FloatUtil.isZero(diff.x(), FloatUtil.EPSILON) || !FloatUtil.isZero(diff.y(), FloatUtil.EPSILON) ) {
+ if( !FloatUtil.isZero(diff.x()) || !FloatUtil.isZero(diff.y()) ) {
System.err.println("CrossHair: Move.1: Win "+glWinX+"/"+glWinY+" -> Obj "+winObjPos+" -> diff "+diff);
crossHair.move(diff.x(), diff.y(), 0f);
} else {
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
index bd36b7509..e016c002f 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java
@@ -482,7 +482,7 @@ public class UITypeDemo01 implements GLEventListener {
// final float[] objPosT = new float[] { objPosC[0]+translate[0], objPosC[1]+translate[1], objPosC[2]+translate[2] };
final Vec3f diff = winObjPos.minus(objPosC);
// final float dz = winObjPos[2] - objPosT[2];
- if( !FloatUtil.isZero(diff.x(), FloatUtil.EPSILON) || !FloatUtil.isZero(diff.y(), FloatUtil.EPSILON) ) {
+ if( !FloatUtil.isZero(diff.x()) || !FloatUtil.isZero(diff.y()) ) {
System.err.println("CrossHair: Move.1: Win "+glWinX+"/"+glWinY+" -> Obj "+winObjPos+" -> diff "+diff);
crossHair.move(diff.x(), diff.y(), 0f);
} else {