From 37429f2690a96491ad0e4fa2a04f2fa88a66da87 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 18 Nov 2021 17:43:46 +0300 Subject: Use M_PI* instead of F_PI* Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- tools/source/generic/poly.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/source') diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 7c5eca59d4c0..8be16bbd5ebd 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -180,7 +180,7 @@ ImplPolygon::ImplPolygon( const Point& rCenter, tools::Long nRadX, tools::Long n if (!bOverflow) { nPoints = static_cast(MinMax( - ( F_PI * ( 1.5 * ( nRadX + nRadY ) - + ( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( static_cast(std::abs(nRadXY)) ) ) ), 32, 256 )); } @@ -200,7 +200,7 @@ ImplPolygon::ImplPolygon( const Point& rCenter, tools::Long nRadX, tools::Long n sal_uInt16 nPoints2 = nPoints >> 1; sal_uInt16 nPoints4 = nPoints >> 2; double nAngle; - double nAngleStep = F_PI2 / ( nPoints4 - 1 ); + double nAngleStep = M_PI_2 / ( nPoints4 - 1 ); for( i=0, nAngle = 0.0; i < nPoints4; i++, nAngle += nAngleStep ) { @@ -246,7 +246,7 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, const Point& rStart, c if (!bOverflow) { nPoints = static_cast(MinMax( - ( F_PI * ( 1.5 * ( nRadX + nRadY ) - + ( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( static_cast(std::abs(nRadXY)) ) ) ), 32, 256 )); } -- cgit