diff options
author | OmkarAcharekar <omkaracharekar12@gmail.com> | 2022-10-22 01:47:10 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-25 08:12:26 +0200 |
commit | 4cec1ec1d575ff0328f014de57abb591e3c7ae11 (patch) | |
tree | 9104b29f0d18bd0eb83a9287a97f59fcc14de5f4 /chart2 | |
parent | 0d47b49c93283d4e5cf4372dd0e981180b995972 (diff) |
tdf#145759 Use symbolic constants instead of magic numerical constants
Change-Id: I68f9dd0bbe5a98de35253220dc33382139b4950e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141657
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/ShapeFactory.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 29259bb7100c..f9efceb676a5 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -58,6 +58,7 @@ #include <sal/log.hxx> #include <algorithm> +#include <cmath> #include <cstddef> using namespace ::com::sun::star; @@ -1322,7 +1323,7 @@ static drawing::PointSequenceSequence createPolyPolygon_Symbol( const drawing::P } case Symbol_Circle: { - double fOmega = 1.5707963267948966192 / (nQuarterCount + 1.0); + double fOmega = M_PI_2 / (nQuarterCount + 1.0); // one point in the middle of each edge to get full size bounding rectangle *pInnerSequence++ = toPoint( fX + fWidthH, fY ); // 0 to PI/2 |