0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / Prs2d / Prs2d_Radius.cxx
index 358d450..0b826c5 100755 (executable)
@@ -60,7 +60,7 @@ Prs2d_Radius::Prs2d_Radius( const Handle(Graphic2d_GraphicObject) & aGO,
    if ( myX2 > myMaxX ) myMaxX = myX2;
    if ( myY2 > myMaxY ) myMaxY = myY2;
    
-   Standard_Real ArrAngle = PI/180.* anArrAngle, theAngle;
+   Standard_Real ArrAngle = M_PI/180.* anArrAngle, theAngle;
    gp_Pnt2d theOrigine( 0., 0. ), P1, P2, P3;
    gp_Vec2d VX( 1., 0. ), VDir;
  
@@ -161,14 +161,14 @@ void Prs2d_Radius::Draw( const Handle(Graphic2d_Drawer)& aDrawer )  {
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
@@ -326,14 +326,14 @@ void Prs2d_Radius::DrawElement( const Handle(Graphic2d_Drawer)& aDrawer,
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }
@@ -510,14 +510,14 @@ Standard_Boolean Prs2d_Radius::Pick( const Standard_ShortReal X,
    gp_Vec2d VX( 1., 0. ), theVec(thePnt2, thePnt1);
    Standard_Real theTxtAngle = VX.Angle( theVec );
    gp_Pnt2d pntText;
-   if ( theTxtAngle >= 0 && theTxtAngle <= PI/2 )
+   if ( theTxtAngle >= 0 && theTxtAngle <= M_PI/2 )
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle > PI/2 && theTxtAngle <= PI ) {
+   else if ( theTxtAngle > M_PI/2 && theTxtAngle <= M_PI ) {
        pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
        theTxtAngle = VX.Angle( theVec.Reversed() );
-   } else if ( theTxtAngle >= -PI/2 && theTxtAngle < 0 )  
+   } else if ( theTxtAngle >= -M_PI/2 && theTxtAngle < 0 )  
        pntText = thePnt2.Translated( (myArrowLen+d1)*theVec/(thePnt1.Distance(thePnt2)) );
-   else if ( theTxtAngle >= -PI && theTxtAngle < -PI/2 ) {
+   else if ( theTxtAngle >= -M_PI && theTxtAngle < -M_PI/2 ) {
         pntText = thePnt1.Translated( (myArrowLen+d1)*theVec.Reversed()/(thePnt1.Distance(thePnt2)) );
         theTxtAngle = VX.Angle( theVec.Reversed() );
    }