Explorar o código

Remove epsilon check for PolygonPoints.add

Gary Hsu %!s(int64=4) %!d(string=hai) anos
pai
achega
9c653ba1b9
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  1. 3 5
      src/Meshes/polygonMesh.ts

+ 3 - 5
src/Meshes/polygonMesh.ts

@@ -31,11 +31,9 @@ class PolygonPoints {
 
         var result = new Array<IndexedVector2>();
         originalPoints.forEach((point) => {
-            if (result.length === 0 || !point.equalsWithEpsilon(result[0])) {
-                var newPoint = new IndexedVector2(point, this.elements.length);
-                result.push(newPoint);
-                this.elements.push(newPoint);
-            }
+            var newPoint = new IndexedVector2(point, this.elements.length);
+            result.push(newPoint);
+            this.elements.push(newPoint);
         });
 
         return result;