From bc0ab08634f59e1a1814e575fe6ad5e50bf1aee1 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 19 Nov 2021 00:22:31 +0300 Subject: Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversions Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- tools/source/generic/point.cxx | 2 +- tools/source/generic/poly.cxx | 2 +- tools/source/generic/poly2.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/source') diff --git a/tools/source/generic/point.cxx b/tools/source/generic/point.cxx index 7308d25f7878..e9c3bd842a15 100644 --- a/tools/source/generic/point.cxx +++ b/tools/source/generic/point.cxx @@ -70,7 +70,7 @@ void Point::RotateAround( tools::Long& rX, tools::Long& rY, } else { - double nRealOrientation = nOrientation.get() * F_PI1800; + double nRealOrientation = toRadians(nOrientation); double nCos = cos( nRealOrientation ); double nSin = sin( nRealOrientation ); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 6a9aff2be250..13d2df0e47ef 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1404,7 +1404,7 @@ void Polygon::Rotate( const Point& rCenter, Degree10 nAngle10 ) if( nAngle10 ) { - const double fAngle = F_PI1800 * nAngle10.get(); + const double fAngle = toRadians(nAngle10); Rotate( rCenter, sin( fAngle ), cos( fAngle ) ); } } diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx index 631e88caf401..c6d0a46032c8 100644 --- a/tools/source/generic/poly2.cxx +++ b/tools/source/generic/poly2.cxx @@ -261,7 +261,7 @@ void PolyPolygon::Rotate( const Point& rCenter, Degree10 nAngle10 ) if( nAngle10 ) { - const double fAngle = F_PI1800 * nAngle10.get(); + const double fAngle = toRadians(nAngle10); Rotate( rCenter, sin( fAngle ), cos( fAngle ) ); } } -- cgit