]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
new gcc and windows port
authoradam <adam>
Tue, 29 Sep 2009 12:34:30 +0000 (12:34 +0000)
committeradam <adam>
Tue, 29 Sep 2009 12:34:30 +0000 (12:34 +0000)
src/INTERP_KERNEL/Geometric2D/QuadraticPolygon.cxx

index 817c68477b192e4559ed451de2d87a797dbacc27..2dc7614af07551f6d4baa372b7450bae3b15a7eb 100644 (file)
@@ -27,6 +27,7 @@
 #include <fstream>
 #include <iomanip>
 #include <cstring>
+#include <limits>
 
 using namespace std;
 using namespace INTERP_KERNEL;
@@ -208,19 +209,19 @@ double QuadraticPolygon::intersectWith(const QuadraticPolygon& other, double* ba
   barycenter[0] = barycenter[1] = 0.;
   vector<QuadraticPolygon *> polygs=intersectMySelfWith(other);
   for(vector<QuadraticPolygon *>::iterator iter=polygs.begin();iter!=polygs.end();iter++)
-  {
-    double area = fabs((*iter)->getArea());
-    (*iter)->getBarycenter(bary);
-    delete *iter;
-    ret+=area;
-    barycenter[0] += bary[0]*area;
-    barycenter[1] += bary[1]*area;
-  }
+    {
+      double area = fabs((*iter)->getArea());
+      (*iter)->getBarycenter(bary);
+      delete *iter;
+      ret+=area;
+      barycenter[0] += bary[0]*area;
+      barycenter[1] += bary[1]*area;
+    }
   if ( ret > std::numeric_limits<double>::min() )
-  {
-    barycenter[0] /= ret;
-    barycenter[1] /= ret;
-  }
+    {
+      barycenter[0] /= ret;
+      barycenter[1] /= ret;
+    }
   return ret;
 }