X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_StreamAltitude.cxx;h=7ab98d3f8a44815301806af7d96009bddded361f;hb=a95289fabbb6fbf6f32c06207422c65aafd5bd65;hp=4811380bd3c7c82f15aecbb85ee4db4fa344f9c8;hpb=b2f3c3ad2e5496eefd5170595d21db70a192bfdd;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_StreamAltitude.cxx b/src/HYDROData/HYDROData_StreamAltitude.cxx index 4811380b..7ab98d3f 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; @@ -281,7 +281,8 @@ bool HYDROData_StreamAltitude::getBoundaryWiresForPoint( return !theLeftWire.IsNull() && !theRightWire.IsNull(); } -double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) const +double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint, + int theMethod) const { DEBTRACE("GetAltitudeForPoint p(" << thePoint.X() << ", " << thePoint.Y() << ")"); double aResAltitude = GetInvalidAltitude();