title: What is the "Uncaught RangeError: Maximum call stack size exceeded"
body: <p>I am try to implement a threecsg library, but when trying to use the functions implemented I get an error saying: &quot;Uncaught RangeError: Maximum call stack size exceeded at Plane.splitPolygon (code.html:229)&quot;</p>
  <p>the code is:</p>
  <pre><code>    /******Code ommitted above******/
      // Split `polygon` by this plane if needed, then put the polygon or polygon
      // fragments in the appropriate lists. Coplanar polygons go into either
      // `coplanarFront` or `coplanarBack` depending on their orientation with
      // respect to this plane. Polygons in front or in back of this plane go into
      // either `front` or `back`.
      splitPolygon(polygon, coplanarFront, coplanarBack, front, back) {   //this is the line with issues
          var COPLANAR = 0;
          var FRONT = 1;
          var BACK = 2;
          var SPANNING = 3;
  
          // Classify each point as well as the entire polygon into one of the above
          // four classes.
          var polygonType = 0;
          var types = [];
          for (var i = 0; i &lt; polygon.vertices.length; i++) {
              var t = this.normal.dot(polygon.vertices[i].pos) - this.w;
              var type = (t &lt; -Plane.EPSILON) ? BACK : (t &gt; Plane.EPSILON) ? FRONT : COPLANAR;
              polygonType |= type;
              types.push(type);
          }
      /******code omitted below******/
  </code></pre>