diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Plane.java b/src/main/java/eu/mihosoft/vrl/v3d/Plane.java index ea24eda1..d6934d7d 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Plane.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Plane.java @@ -140,9 +140,11 @@ public static Vector3d computeNormal(List vertices) { // If all else fails, return a default normal (e.g., in the z direction) lengthSquared = normal.lengthSquared(); - if (lengthSquared < d) { + if (lengthSquared < Double.MIN_VALUE*10) { throw new NumberFormatException("This set of points is not a valid polygon"); } + if(normalized.lengthSquared()