From 716e59a9286ebf6c8a215957ab4a74a2a81315e4 Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Wed, 14 Feb 2024 15:34:55 +0100 Subject: Use FloatUtil.isZero(a) w/ build-in FloatUtil.EPSILON directly instead of passing FloatUtil.EPSILON to explicit isZero(a, epsilon) --- src/jogl/classes/com/jogamp/math/VectorUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/com/jogamp/math/VectorUtil.java') diff --git a/src/jogl/classes/com/jogamp/math/VectorUtil.java b/src/jogl/classes/com/jogamp/math/VectorUtil.java index af2951956..14f03ab93 100644 --- a/src/jogl/classes/com/jogamp/math/VectorUtil.java +++ b/src/jogl/classes/com/jogamp/math/VectorUtil.java @@ -125,7 +125,7 @@ public final class VectorUtil { */ public static float[] normalizeVec3(final float[] vector) { final float lengthSq = normSquareVec3(vector); - if ( FloatUtil.isZero(lengthSq, FloatUtil.EPSILON) ) { + if ( FloatUtil.isZero(lengthSq) ) { vector[0] = 0f; vector[1] = 0f; vector[2] = 0f; @@ -145,7 +145,7 @@ public final class VectorUtil { */ public static float[] normalizeVec3(final float[] vector, final int offset) { final float lengthSq = normSquareVec3(vector, offset); - if ( FloatUtil.isZero(lengthSq, FloatUtil.EPSILON) ) { + if ( FloatUtil.isZero(lengthSq) ) { vector[0+offset] = 0f; vector[1+offset] = 0f; vector[2+offset] = 0f; @@ -284,7 +284,7 @@ public final class VectorUtil { * @return true if collinear, false otherwise */ public static boolean isCollinear(final Vec3f v1, final Vec3f v2, final Vec3f v3) { - return FloatUtil.isZero( determinant(v1, v2, v3), FloatUtil.EPSILON ); + return FloatUtil.isZero( determinant(v1, v2, v3) ); } public static final double InCircleDThreshold = DoubleUtil.EPSILON; -- cgit v1.2.3