summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
index af1db0c1e..8b3b9dbf1 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
@@ -2265,6 +2265,14 @@ public final class FloatUtil {
return Math.abs(a) < epsilon;
}
+ /**
+ * Return true if value is zero, i.e. it's absolute value < <code>epsilon</code>.
+ * @see #EPSILON
+ */
+ public static boolean isZero(final float a) {
+ return Math.abs(a) < FloatUtil.EPSILON;
+ }
+
public static float abs(final float a) { return java.lang.Math.abs(a); }
public static float pow(final float a, final float b) { return (float) java.lang.Math.pow(a, b); }