diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-18 17:43:46 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 09:59:43 +0100 |
commit | 37429f2690a96491ad0e4fa2a04f2fa88a66da87 (patch) | |
tree | 9963c1f531f22306edaf2ce8b41d5636f5e191f3 /include/basegfx | |
parent | 0afd2d3bfa9d55249ffd1408681ff04decf2d8fa (diff) |
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'include/basegfx')
-rw-r--r-- | include/basegfx/numeric/ftools.hxx | 9 | ||||
-rw-r--r-- | include/basegfx/polygon/b2dlinegeometry.hxx | 4 | ||||
-rw-r--r-- | include/basegfx/polygon/b2dpolygontools.hxx | 2 | ||||
-rw-r--r-- | include/basegfx/polygon/b3dpolypolygontools.hxx | 8 |
4 files changed, 7 insertions, 16 deletions
diff --git a/include/basegfx/numeric/ftools.hxx b/include/basegfx/numeric/ftools.hxx index 102e3b324942..7045695bf5fb 100644 --- a/include/basegfx/numeric/ftools.hxx +++ b/include/basegfx/numeric/ftools.hxx @@ -27,15 +27,6 @@ #include <algorithm> -#ifndef F_PI -#define F_PI M_PI -#endif -#ifndef F_PI2 -#define F_PI2 M_PI_2 -#endif -#ifndef F_PI4 -#define F_PI4 M_PI_4 -#endif #ifndef F_PI1800 #define F_PI1800 (M_PI/1800.0) #endif diff --git a/include/basegfx/polygon/b2dlinegeometry.hxx b/include/basegfx/polygon/b2dlinegeometry.hxx index 0e9f5241b866..e12dd74987f9 100644 --- a/include/basegfx/polygon/b2dlinegeometry.hxx +++ b/include/basegfx/polygon/b2dlinegeometry.hxx @@ -106,7 +106,7 @@ namespace basegfx::utils Allows to hand over the maximum allowed angle between an edge and it's control vectors. The smaller, the more subdivisions will be needed to create the filled geometry. Allowed range is cropped to - [F_PI2 .. 0.01 * F_PI2]. + [M_PI_2 .. 0.01 * M_PI_2]. @param fMaxPartOfEdge Allows to influence from with relative length of a control vector @@ -118,7 +118,7 @@ namespace basegfx::utils The minimum wanted angle between two edges when edge rounding is using miter. When an edge is smaller than this (tighter) the usual fallback to bevel is used. Allowed range is cropped - to [F_PI .. 0.01 * F_PI]. + to [M_PI .. 0.01 * M_PI]. Commit 51b5b93092d6231615de470c62494c24e54828a1 needs revert, we need the triangulation for X11 fat line drawing diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx index 40a4027a507d..a2a3263a573d 100644 --- a/include/basegfx/polygon/b2dpolygontools.hxx +++ b/include/basegfx/polygon/b2dpolygontools.hxx @@ -263,7 +263,7 @@ namespace basegfx::utils */ BASEGFX_DLLPUBLIC B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius ); - /// create half circle centered on (0,0) from [0 .. F_PI] + /// create half circle centered on (0,0) from [0 .. M_PI] B2DPolygon const & createHalfUnitCircle(); /** create a polygon which describes the unit circle and close it diff --git a/include/basegfx/polygon/b3dpolypolygontools.hxx b/include/basegfx/polygon/b3dpolypolygontools.hxx index cd51ac9e6524..4480f3266704 100644 --- a/include/basegfx/polygon/b3dpolypolygontools.hxx +++ b/include/basegfx/polygon/b3dpolypolygontools.hxx @@ -61,7 +61,7 @@ namespace basegfx::utils */ BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSpherePolyPolygon( sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, - double fVerStart = F_PI2, double fVerStop = -F_PI2, + double fVerStart = M_PI_2, double fVerStop = -M_PI_2, double fHorStart = 0.0, double fHorStop = F_2PI); /** Create a 3D line polyPolygon from a B3DRange which defines a sphere with the given count of hor and ver segments. @@ -71,7 +71,7 @@ namespace basegfx::utils BASEGFX_DLLPUBLIC B3DPolyPolygon createSpherePolyPolygonFromB3DRange( const B3DRange& rRange, sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, - double fVerStart = F_PI2, double fVerStop = -F_PI2, + double fVerStart = M_PI_2, double fVerStop = -M_PI_2, double fHorStart = 0.0, double fHorStop = F_2PI); /** same as createUnitSpherePolyPolygon, but creates filled polygons (closed and oriented) @@ -80,7 +80,7 @@ namespace basegfx::utils BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSphereFillPolyPolygon( sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, bool bNormals = false, - double fVerStart = F_PI2, double fVerStop = -F_PI2, + double fVerStart = M_PI_2, double fVerStop = -M_PI_2, double fHorStart = 0.0, double fHorStop = F_2PI); /** same as createSpherePolyPolygonFromB3DRange, but creates filled polygons (closed and oriented) @@ -90,7 +90,7 @@ namespace basegfx::utils const B3DRange& rRange, sal_uInt32 nHorSeg, sal_uInt32 nVerSeg, bool bNormals = false, - double fVerStart = F_PI2, double fVerStop = -F_PI2, + double fVerStart = M_PI_2, double fVerStop = -M_PI_2, double fHorStart = 0.0, double fHorStop = F_2PI); /** Create/replace normals for given 3d geometry with default normals from given center to outside. |