summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/polygon')
-rw-r--r--basegfx/source/polygon/b2dlinegeometry.cxx4
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx6
-rw-r--r--basegfx/source/polygon/b3dpolygontools.cxx4
-rw-r--r--basegfx/source/polygon/b3dpolypolygontools.cxx12
4 files changed, 13 insertions, 13 deletions
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index 03d73a8d3028..6dda8f9e7e1f 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -771,12 +771,12 @@ namespace basegfx
// atan2 results are [-PI .. PI], consolidate to [0.0 .. 2PI]
if(fAngleStart < 0.0)
{
- fAngleStart += F_2PI;
+ fAngleStart += 2 * M_PI;
}
if(fAngleEnd < 0.0)
{
- fAngleEnd += F_2PI;
+ fAngleEnd += 2 * M_PI;
}
const B2DPolygon aBow(utils::createPolygonFromEllipseSegment(rPoint, fHalfLineWidth, fHalfLineWidth, fAngleStart, fAngleEnd));
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index ce62a95c020f..d497716e9c31 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -1822,14 +1822,14 @@ namespace basegfx::utils
{
B2DPolygon aRetval;
- // truncate fStart, fEnd to a range of [0.0 .. F_2PI[ where F_2PI
+ // truncate fStart, fEnd to a range of [0.0 .. 2PI[ where 2PI
// falls back to 0.0 to ensure a unique definition
if(fTools::less(fStart, 0.0))
{
fStart = 0.0;
}
- if(fTools::moreOrEqual(fStart, F_2PI))
+ if(fTools::moreOrEqual(fStart, 2 * M_PI))
{
fStart = 0.0;
}
@@ -1839,7 +1839,7 @@ namespace basegfx::utils
fEnd = 0.0;
}
- if(fTools::moreOrEqual(fEnd, F_2PI))
+ if(fTools::moreOrEqual(fEnd, 2 * M_PI))
{
fEnd = 0.0;
}
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index 708417122abf..a1f65bef2f48 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -401,7 +401,7 @@ namespace basegfx::utils
// transitions which value to choose
const B3DRange aPlaneRange(getRange(rCandidate));
const B3DPoint aPlaneCenter(aPlaneRange.getCenter() - rCenter);
- const double fXCenter(fOne - ((atan2(aPlaneCenter.getZ(), aPlaneCenter.getX()) + M_PI) / F_2PI));
+ const double fXCenter(fOne - ((atan2(aPlaneCenter.getZ(), aPlaneCenter.getX()) + M_PI) / (2 * M_PI)));
for(a = 0; a < nPointCount; a++)
{
@@ -438,7 +438,7 @@ namespace basegfx::utils
}
else
{
- double fX(fOne - ((atan2(aVector.getZ(), aVector.getX()) + M_PI) / F_2PI));
+ double fX(fOne - ((atan2(aVector.getZ(), aVector.getX()) + M_PI) / (2 * M_PI)));
// correct cartesian point coordinate dependent from center value
if(fX > fXCenter + 0.5)
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index 2c7b3c1fc5a3..62ddd3ae771f 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -200,7 +200,7 @@ namespace basegfx::utils
}
// helper for getting the 3D Point from given cartesian coordinates. fHor is defined from
- // [M_PI_2 .. -M_PI_2], fVer from [0.0 .. F_2PI]
+ // [M_PI_2 .. -M_PI_2], fVer from [0.0 .. 2PI]
static B3DPoint getPointFromCartesian(double fHor, double fVer)
{
const double fCosVer(cos(fVer));
@@ -217,7 +217,7 @@ namespace basegfx::utils
if(!nHorSeg)
{
- nHorSeg = fround(fabs(fHorStop - fHorStart) / (F_2PI / 24.0));
+ nHorSeg = fround(fabs(fHorStop - fHorStart) / (M_PI / 12.0));
}
// min/max limitations
@@ -225,7 +225,7 @@ namespace basegfx::utils
if(!nVerSeg)
{
- nVerSeg = fround(fabs(fVerStop - fVerStart) / (F_2PI / 24.0));
+ nVerSeg = fround(fabs(fVerStop - fVerStart) / (M_PI / 12.0));
}
// min/max limitations
@@ -234,7 +234,7 @@ namespace basegfx::utils
// create constants
const double fVerDiffPerStep((fVerStop - fVerStart) / static_cast<double>(nVerSeg));
const double fHorDiffPerStep((fHorStop - fHorStart) / static_cast<double>(nHorSeg));
- bool bHorClosed(fTools::equal(fHorStop - fHorStart, F_2PI));
+ bool bHorClosed(fTools::equal(fHorStop - fHorStart, 2 * M_PI));
bool bVerFromTop(fTools::equal(fVerStart, M_PI_2));
bool bVerToBottom(fTools::equal(fVerStop, -M_PI_2));
@@ -316,7 +316,7 @@ namespace basegfx::utils
if(!nHorSeg)
{
- nHorSeg = fround(fabs(fHorStop - fHorStart) / (F_2PI / 24.0));
+ nHorSeg = fround(fabs(fHorStop - fHorStart) / (M_PI / 12.0));
}
// min/max limitations
@@ -324,7 +324,7 @@ namespace basegfx::utils
if(!nVerSeg)
{
- nVerSeg = fround(fabs(fVerStop - fVerStart) / (F_2PI / 24.0));
+ nVerSeg = fround(fabs(fVerStop - fVerStart) / (M_PI / 12.0));
}
// min/max limitations