aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/math/VectorUtil.java
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/jogl/classes/com/jogamp/math/VectorUtil.java
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/jogl/classes/com/jogamp/math/VectorUtil.java')
-rw-r--r--src/jogl/classes/com/jogamp/math/VectorUtil.java6
1 files changed, 3 insertions, 3 deletions
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;