X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_StreamAltitude.cxx;h=2360eddd0fce93aa735dd9b99d12bfe530995f6e;hb=e35b4caf3341d2cece2b7921f349acd17fb89351;hp=cbd1cca0c6bcb6ce389cc8628b17c7bc6d6f6340;hpb=05d82ada59110252be57aaa774095a18ebdca455;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_StreamAltitude.cxx b/src/HYDROData/HYDROData_StreamAltitude.cxx index cbd1cca0..2360eddd 100644 --- a/src/HYDROData/HYDROData_StreamAltitude.cxx +++ b/src/HYDROData/HYDROData_StreamAltitude.cxx @@ -126,7 +126,7 @@ bool IsPointBetweenEdges2( const gp_Pnt& aFirstPnt1, const gp_Pnt& aLastPnt1, double z1 = x1*ya -xa*y1; // v1^va: z component double z2 = x2*yb -xb*y2; // v2^vb: z component bool isBetween = true; - if (((z1<0) and (z2<0)) or ((z1>=0) and (z2>=0))) + if (((z1<0) && (z2<0)) || ((z1>=0) && (z2>=0))) { isBetween = false; } @@ -138,9 +138,9 @@ bool IsPointBetweenEdges2( const gp_Pnt& aFirstPnt1, const gp_Pnt& aLastPnt1, double dl1 = (aLastPnt1.X()-xg)*(aLastPnt1.X()-xg) + (aLastPnt1.Y()-yg)*(aLastPnt1.Y()-yg); double df2 = (aFirstPnt2.X()-xg)*(aFirstPnt2.X()-xg) + (aFirstPnt2.Y()-yg)*(aFirstPnt2.Y()-yg); double dl2 = (aLastPnt2.X()-xg)*(aLastPnt2.X()-xg) + (aLastPnt2.Y()-yg)*(aLastPnt2.Y()-yg); - double r2 = fmax(df1,dl1); - r2 = fmax(r2,df2); - r2 = fmax(r2,dl2); + double r2 = std::max(df1,dl1); + r2 = std::max(r2,df2); + r2 = std::max(r2,dl2); double d2 = (thePoint.X()-xg)*(thePoint.X()-xg) + (thePoint.Y()-yg)*(thePoint.Y()-yg); if (d2 > r2) isBetween = false;