diff options
author | Hossein <hossein@libreoffice.org> | 2021-11-16 12:56:49 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-16 15:54:30 +0100 |
commit | b0ce4e848f786a2f452a6a6e426df4b95af4da3c (patch) | |
tree | 2d1c2b9b981e89c334246523155f03cb69e8d23c /filter | |
parent | 84b817130a1b19591c3add9af5db0f42af64be68 (diff) |
Use basegfx::deg2rad instead of *0.01745329251994
* Replaced multiplying by magic number 0.01745329251994 with
basegfx::deg2rad() which is equal to M_PI/180.0
* Instances of this could be found using:
git grep 0.01745329251994 *.cxx *.hxx
Change-Id: Ib813251f6223e4218fe977c0211732c22199295d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125294
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/icgm/bitmap.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx index 897d2d57e753..cb319cb038e0 100644 --- a/filter/source/graphicfilter/icgm/bitmap.cxx +++ b/filter/source/graphicfilter/icgm/bitmap.cxx @@ -234,7 +234,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc ) nX = rDesc.mnQ.X - rDesc.mnR.X; nY = rDesc.mnQ.Y - rDesc.mnR.Y; - double fAngle = 0.01745329251994 * ( 360 - rDesc.mnOrientation ); + double fAngle = basegfx::deg2rad( 360 - rDesc.mnOrientation ); double fSin = sin(fAngle); double fCos = cos(fAngle); nX = fCos * nX + fSin * nY; |