arpruss 8 years ago
parent
commit
1246733823
1 changed files with 4 additions and 4 deletions
  1. 4 4
      split.html

+ 4 - 4
split.html

@@ -236,12 +236,12 @@ function splitMesh(triangles) {
             delete meshes[i].points;
         }
         
-        function compareByBounds(m,m) {
+        function compareByBounds(m,mm) {
             for (var i=0; i<6; i++) {
-                if (m.bounds[i] < m.bounds[i])
-                    return -1;
-                else if (m.bounds[i] < m.bounds[i])
+                if (m.bounds[i] < mm.bounds[i]) 
                     return -1;
+                else if (mm.bounds[i] < m.bounds[i])
+                    return 1;
             }
             return 0;
         }