summaryrefslogtreecommitdiffstats
path: root/src/extension/dbus/document-interface.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-08-17 07:39:43 +0000
committertavmjong-free <tavmjong@free.fr>2016-08-17 07:39:43 +0000
commit2f53e4dbb4620edcabaffc964c55cb71090912f8 (patch)
tree5c7119a28798a5d6b500ad092b92bf10720f80b1 /src/extension/dbus/document-interface.cpp
parentAdd std::nothrow so tests of memory allocation work as expected. (diff)
downloadinkscape-2f53e4dbb4620edcabaffc964c55cb71090912f8.tar.gz
inkscape-2f53e4dbb4620edcabaffc964c55cb71090912f8.zip
Use M_PI, M_PI_2. We use these constants everywhere so if they are not defined we are already in trouble.
No need to define them ourselves (except maybe in shared libraries). (bzr r15063)
Diffstat (limited to 'src/extension/dbus/document-interface.cpp')
-rw-r--r--src/extension/dbus/document-interface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp
index 5a8fb0918..667830997 100644
--- a/src/extension/dbus/document-interface.cpp
+++ b/src/extension/dbus/document-interface.cpp
@@ -405,7 +405,7 @@ document_interface_polygon (DocumentInterface *doc_interface, int cx, int cy,
int radius, int rotation, int sides,
GError **error)
{
- gdouble rot = ((rotation / 180.0) * 3.14159265) - ( 3.14159265 / 2.0);
+ gdouble rot = ((rotation / 180.0) * M_PI) - M_PI_2;
Inkscape::XML::Node *newNode = dbus_create_node(doc_interface->target.getDocument(), "svg:path");
newNode->setAttribute("inkscape:flatsided", "true");
newNode->setAttribute("sodipodi:type", "star");