diff --git a/Numeric/DivideAndConquer.cpp b/Numeric/DivideAndConquer.cpp index f3d44d3e3e760588824ffe8f4d51b681c03138b6..ae5f1dd217368eeae220b97efc902b7c333897c5 100644 --- a/Numeric/DivideAndConquer.cpp +++ b/Numeric/DivideAndConquer.cpp @@ -651,10 +651,10 @@ void centroidOfPolygon(SPoint2 &pc, std::vector<SPoint2> &pts, yc = x.y(); } -double DocRecord::Lloyd(int type) +double DocRecord::Lloyd(int type) { fullMatrix<double> cgs(numPoints,2); - double inertia_tot; + double inertia_tot = 0.; for(PointNumero i = 0; i < numPoints; i++) { PointRecord &pt = points[i]; std::vector<SPoint2> pts;