commit 898ff658761d7e3856d2853e73118a0e92fbad81
Author: leszek <leszek@koltunski.pl>
Date:   Fri Jul 14 01:26:20 2023 +0200

    another bugfix for MeshMultigon.

diff --git a/src/main/java/org/distorted/library/mesh/MeshMultigon.java b/src/main/java/org/distorted/library/mesh/MeshMultigon.java
index 72e6c4d..7e3f627 100644
--- a/src/main/java/org/distorted/library/mesh/MeshMultigon.java
+++ b/src/main/java/org/distorted/library/mesh/MeshMultigon.java
@@ -34,7 +34,7 @@ import java.util.ArrayList;
  */
 public class MeshMultigon extends MeshBase
   {
-  private static final float MAX_ERROR = 0.0001f;
+  private static final float MAX_ERROR = 0.000001f;
   private float[][] mOuterVertices;
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -129,13 +129,6 @@ public class MeshMultigon extends MeshBase
     return diff<0 ? diff+(2*Math.PI) : diff;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  private boolean pointsTheSame(float dx, float dy)
-    {
-    return dx*dx + dy*dy < 0.000001f;
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   private float[] detectNextOuterVertex(float[][] vertices, float[] curr, float[] vect)
@@ -152,7 +145,7 @@ public class MeshMultigon extends MeshBase
         float xc = v[2*j];
         float yc = v[2*j+1];
 
-        if( pointsTheSame(xc-curr[0],yc-curr[1]) )
+        if( isSame(xc-curr[0],yc-curr[1]) )
           {
           int n = (j==num-1 ? 0 : j+1);
           float xn = v[2*n];
@@ -193,7 +186,7 @@ public class MeshMultigon extends MeshBase
       vect[1] = prev[1]-next[1];
       tmp.add(next);
       }
-    while( !pointsTheSame(next[0]-first[0],next[1]-first[1]) );
+    while( !isSame(next[0]-first[0],next[1]-first[1]) );
 
     int num = tmp.size();
     mOuterVertices = new float[num][];
@@ -205,7 +198,7 @@ public class MeshMultigon extends MeshBase
   private boolean doesntBelongToOuter(float x, float y)
     {
     for( float[] v : mOuterVertices )
-      if( x==v[0] && y==v[1] ) return false;
+      if( isSame(x-v[0],y-v[1]) ) return false;
 
     return true;
     }
