aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
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/newt/classes/jogamp
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/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/MonitorModeProps.java2
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/ios/ScreenDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java4
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java2
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java4
6 files changed, 8 insertions, 8 deletions
diff --git a/src/newt/classes/jogamp/newt/MonitorModeProps.java b/src/newt/classes/jogamp/newt/MonitorModeProps.java
index 06158a033..14d6cece4 100644
--- a/src/newt/classes/jogamp/newt/MonitorModeProps.java
+++ b/src/newt/classes/jogamp/newt/MonitorModeProps.java
@@ -470,7 +470,7 @@ public class MonitorModeProps {
final MonitorDevice b = monitors.get(j);
if( !b.isClone() ) {
final float coverage = b.getViewport().coverage( a.getViewport() );
- if( FloatUtil.isZero( 1f - coverage, FloatUtil.EPSILON ) ) {
+ if( FloatUtil.isZero( 1f - coverage ) ) {
((MonitorDeviceImpl)b).setIsClone(true);
if( Screen.DEBUG ) {
System.err.printf("MonitorCloneTest[%d of %d]: %f -> _is_ covered%n", j, i, coverage);
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index ff333f720..fe92d9f38 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -2906,7 +2906,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
final float[] newPixelScale = new float[2];
final float[] maxPixelScale = new float[2];
{
- if( FloatUtil.isZero(newPixelScaleRaw[0], FloatUtil.EPSILON) || FloatUtil.isZero(newPixelScaleRaw[1], FloatUtil.EPSILON) ) {
+ if( FloatUtil.isZero(newPixelScaleRaw[0]) || FloatUtil.isZero(newPixelScaleRaw[1]) ) {
newPixelScale[0]= ScalableSurface.IDENTITY_PIXELSCALE;
newPixelScale[1]= ScalableSurface.IDENTITY_PIXELSCALE;
} else {
diff --git a/src/newt/classes/jogamp/newt/driver/ios/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/ios/ScreenDriver.java
index f617ffc04..b86b65dd5 100644
--- a/src/newt/classes/jogamp/newt/driver/ios/ScreenDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/ios/ScreenDriver.java
@@ -83,7 +83,7 @@ public class ScreenDriver extends ScreenImpl {
for(int crtIdx=0; crtIdx<count; crtIdx++) {
final int crt_id = crtIDs[crtIdx];
final float pixelScaleRaw = IOSUtil.GetScreenPixelScaleByScreenIdx(crt_id);
- pixelScaleArray[crtIdx] = FloatUtil.isZero(pixelScaleRaw, FloatUtil.EPSILON) ? 1.0f : pixelScaleRaw;
+ pixelScaleArray[crtIdx] = FloatUtil.isZero(pixelScaleRaw) ? 1.0f : pixelScaleRaw;
propsOrigArray[crtIdx] = getMonitorProps0(crt_id);
if ( null == propsOrigArray[crtIdx] ) {
throw new InternalError("Could not gather device props "+crtIdx+"/"+count+" -> "+Display.toHexString(crt_id));
diff --git a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
index 6aa4fdc9c..d6df3b2f1 100644
--- a/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/ios/WindowDriver.java
@@ -66,10 +66,10 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
final float newPixelScaleRaw, final float maxPixelScaleRaw) {
final float[] newPixelScale = new float[2];
{
- final float _newPixelScale = FloatUtil.isZero(newPixelScaleRaw, FloatUtil.EPSILON) ? ScalableSurface.IDENTITY_PIXELSCALE : newPixelScaleRaw;
+ final float _newPixelScale = FloatUtil.isZero(newPixelScaleRaw) ? ScalableSurface.IDENTITY_PIXELSCALE : newPixelScaleRaw;
newPixelScale[0]= _newPixelScale;
newPixelScale[1]= _newPixelScale;
- final float _maxPixelScale = FloatUtil.isZero(maxPixelScaleRaw, FloatUtil.EPSILON) ? ScalableSurface.IDENTITY_PIXELSCALE : maxPixelScaleRaw;
+ final float _maxPixelScale = FloatUtil.isZero(maxPixelScaleRaw) ? ScalableSurface.IDENTITY_PIXELSCALE : maxPixelScaleRaw;
maxPixelScale[0]= _maxPixelScale;
maxPixelScale[1]= _maxPixelScale;
}
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java
index ec661e5f6..131de0d25 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java
@@ -89,7 +89,7 @@ public class ScreenDriver extends ScreenImpl {
for(int crtIdx=0; crtIdx<count; crtIdx++) {
final int crt_id = crtIDs[crtIdx];
final float pixelScaleRaw = OSXUtil.GetScreenPixelScaleByDisplayID(crt_id);
- pixelScaleArray[crtIdx] = FloatUtil.isZero(pixelScaleRaw, FloatUtil.EPSILON) ? 1.0f : pixelScaleRaw;
+ pixelScaleArray[crtIdx] = FloatUtil.isZero(pixelScaleRaw) ? 1.0f : pixelScaleRaw;
propsOrigArray[crtIdx] = getMonitorProps0(crt_id);
if ( null == propsOrigArray[crtIdx] ) {
throw new InternalError("Could not gather device props "+crtIdx+"/"+count+" -> "+Display.toHexString(crt_id));
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
index e8383916e..fb1b483fc 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
@@ -73,10 +73,10 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
final float newPixelScaleRaw, final float maxPixelScaleRaw) {
final float[] newPixelScale = new float[2];
{
- final float _newPixelScale = FloatUtil.isZero(newPixelScaleRaw, FloatUtil.EPSILON) ? ScalableSurface.IDENTITY_PIXELSCALE : newPixelScaleRaw;
+ final float _newPixelScale = FloatUtil.isZero(newPixelScaleRaw) ? ScalableSurface.IDENTITY_PIXELSCALE : newPixelScaleRaw;
newPixelScale[0]= _newPixelScale;
newPixelScale[1]= _newPixelScale;
- final float _maxPixelScale = FloatUtil.isZero(maxPixelScaleRaw, FloatUtil.EPSILON) ? ScalableSurface.IDENTITY_PIXELSCALE : maxPixelScaleRaw;
+ final float _maxPixelScale = FloatUtil.isZero(maxPixelScaleRaw) ? ScalableSurface.IDENTITY_PIXELSCALE : maxPixelScaleRaw;
maxPixelScale[0]= _maxPixelScale;
maxPixelScale[1]= _maxPixelScale;
}