rem: } while (--n); 
add: } 
context:   centroid: function() {    if (this.isTriangle()) {      var A = this.v(1).elements, B = this.v(2).elements, C = this.v(3).elements;      return Vector.create([(A[0] + B[0] + C[0])/3, (A[1] + B[1] + C[1])/3, (A[2] + B[2] + C[2])/3]);    } else {      var A, M = 0, V = Vector.Zero(3), P, C, trigs = this.trianglesForSurfaceIntegral();      var n = trigs.length, k = n, i;      do { i = k - n;        A = trigs[i].area() * trigs[i].plane.normal.dot(this.plane.normal);        M += A;        P = V.elements;        C = trigs[i].centroid().elements;        V.setElements([P[0] + C[0] * A, P[1] + C[1] * A, P[2] + C[2] * A]);      } while (--n);      return V.x(1/M);    }  },
meta: 3877	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3877/5bb35ddb3516d7e68f3747d86540ffaa68de3fe3/polygon.js/clean/src/polygon.js