diff options
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/dbus/document-interface.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/odf.cpp | 5 |
2 files changed, 2 insertions, 5 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"); diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 6904eb2fd..f885ef5e5 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -873,11 +873,8 @@ int SingularValueDecomposition::rank() -#define pi 3.14159 //#define pxToCm 0.0275 #define pxToCm 0.03 -#define piToRad 0.0174532925 -#define docHeightCm 22.86 //######################################################################## @@ -1565,7 +1562,7 @@ bool OdfOutput::processGradient(SPItem *item, output += buf; //TODO: apply maths, to define begin of gradient, taking gradient begin and end, as well as object boundary into account double angle = (gi.y2-gi.y1); - angle = (angle != 0.) ? (atan((gi.x2-gi.x1)/(gi.y2-gi.y1))* 180. / pi) : 90; + angle = (angle != 0.) ? (atan((gi.x2-gi.x1)/(gi.y2-gi.y1))* 180. / M_PI) : 90; angle = (angle < 0)?(180+angle):angle; angle = angle * 10; //why do we need this: precision????????????? output += Glib::ustring::compose(" draw:start-intensity=\"%1\" draw:end-intensity=\"%2\" draw:angle=\"%3\"/>\n", |
