summaryrefslogtreecommitdiffstats
path: root/src/sp-ellipse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-ellipse.cpp')
-rw-r--r--src/sp-ellipse.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 995f880c2..0d60aa5d8 100644
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -33,16 +33,10 @@
#include "svg/path-string.h"
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-#define SP_2PI (2 * M_PI)
-
SPGenericEllipse::SPGenericEllipse()
: SPShape()
, start(0)
- , end(SP_2PI)
+ , end(M_2_PI)
, type(SP_GENERIC_ELLIPSE_UNDEFINED)
, _closed(true)
{
@@ -533,7 +527,7 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
// Snap to the 4 quadrant points of the ellipse, but only if the arc
// spans far enough to include them
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)) {
- for (double angle = 0; angle < SP_2PI; angle += M_PI_2) {
+ for (double angle = 0; angle < M_2_PI; angle += M_PI_2) {
if (Geom::AngleInterval(this->start, this->end, true).contains(angle)) {
Geom::Point pt = this->getPointAtAngle(angle) * i2dt;
p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT));
@@ -668,7 +662,7 @@ bool SPGenericEllipse::_isSlice() const
{
Geom::AngleInterval a(this->start, this->end, true);
- return !(Geom::are_near(a.extent(), 0) || Geom::are_near(a.extent(), SP_2PI));
+ return !(Geom::are_near(a.extent(), 0) || Geom::are_near(a.extent(), M_2_PI));
}
/*