diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-08-17 07:39:43 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-08-17 07:39:43 +0000 |
| commit | 2f53e4dbb4620edcabaffc964c55cb71090912f8 (patch) | |
| tree | 5c7119a28798a5d6b500ad092b92bf10720f80b1 /src/extension/internal/odf.cpp | |
| parent | Add std::nothrow so tests of memory allocation work as expected. (diff) | |
| download | inkscape-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/internal/odf.cpp')
| -rw-r--r-- | src/extension/internal/odf.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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", |
