Salome HOME
replace abs by fabs for doubles
[modules/hydro.git] / src / HYDROData / HYDROData_PolylineXY.cxx
index 54c418ac975ccdaab3a25de9d4e12d983f2d7304..fb8a61ade903ac3fa4618dbb958ed4724848e3d2 100644 (file)
@@ -528,29 +528,29 @@ bool convertEdgesToSections( const TopoDS_Edge&
                     }
                   else // old section closed: check if we use first or last points...
                     {
-                      if((pmin < pmax) && ((std::abs(pmin - pfirst)> 1.e-3) && (std::abs(pmax - plast) >1.e-3))) // internal points forward
+                      if((pmin < pmax) && ((std::fabs(pmin - pfirst)> 1.e-3) && (std::fabs(pmax - plast) >1.e-3))) // internal points forward
                         forward = true;
-                      else if ((pmin > pmax) && ((std::abs(pmin - plast)> 1.e-3) && (std::abs(pmax - pfirst) >1.e-3))) // internal points reverse
+                      else if ((pmin > pmax) && ((std::fabs(pmin - plast)> 1.e-3) && (std::fabs(pmax - pfirst) >1.e-3))) // internal points reverse
                         {
                           pmin = p[1];
                           pmax = p[0];
                           forward = false;
                         }
-                      else if ((std::abs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst
+                      else if ((std::fabs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst
                           pmin = pfirst;
-                      else if ((std::abs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse
+                      else if ((std::fabs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse
                         {
                           pmin = p[1];
                           pmax = p[0];
                           forward = false;
                         }
-                      else if ((std::abs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse
+                      else if ((std::fabs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse
                         {
                           pmin = p[1];
                           pmax = p[0];
                           forward = false;
                         }
-                      else if ((std::abs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast
+                      else if ((std::fabs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast
                         pmax = plast;
                    }
                   DEBTRACE("forward: "<< forward << " pmin " << pmin <<  " pmax " << pmax);