rem: this.vertices.each(function(node) { V = node.data.elements; W = node.next.data.elements; A = Vector.create([V[0] - P[0], V[1] - P[1], V[2] - (P[2] || 0)]); B = Vector.create([W[0] - P[0], W[1] - P[1], W[2] - (P[2] || 0)]); dt = A.angleFrom(B); if (dt === null || dt === 0) { return; } theta += (A.cross(B).isParallelTo(self.plane.normal) ? 1 : -1) * dt; if (theta >= 2 * Math.PI - Sylvester.precision) { loops++; theta -= 2 * Math.PI; } if (theta <= -2 * Math.PI + Sylvester.precision) { loops--; theta += 2 * Math.PI; } }); 
add: this.updateTrianglePlanes(function(plane) { return Plane.create(anchor, plane.normal); }); 
context:     this.vertices.each(function(node) {      V = node.data.elements;      W = node.next.data.elements;      A = Vector.create([V[0] - P[0], V[1] - P[1], V[2] - (P[2] || 0)]);      B = Vector.create([W[0] - P[0], W[1] - P[1], W[2] - (P[2] || 0)]);      dt = A.angleFrom(B);      if (dt === null || dt === 0) { return; }      theta += (A.cross(B).isParallelTo(self.plane.normal) ? 1 : -1) * dt;      if (theta >= 2 * Math.PI - Sylvester.precision) { loops++; theta -= 2 * Math.PI; }      if (theta <= -2 * Math.PI + Sylvester.precision) { loops--; theta += 2 * Math.PI; }    });
meta: 3877	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3877/88af0516a961fea263ffc0d016435fdbb11d55cf/polygon.js/buggy/src/polygon.js