summaryrefslogtreecommitdiffstats
path: root/src/mod360.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-03-25 22:12:45 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-03-25 22:12:45 +0000
commit8a5bebb2b8946eee675c7fee4f7448d5d42e71b6 (patch)
tree52a6480eccdb74cdaca13d88e7f6fc5528be3b71 /src/mod360.cpp
parentwhitespace. tab to spaces. improve readability (diff)
downloadinkscape-8a5bebb2b8946eee675c7fee4f7448d5d42e71b6.tar.gz
inkscape-8a5bebb2b8946eee675c7fee4f7448d5d42e71b6.zip
Major overhaul of the selector tool's internals to improve handling of transformations, origins and snapping, for both visual and geometric bounding boxes (see for example bug #174046 in Launchpad)
(bzr r5189)
Diffstat (limited to 'src/mod360.cpp')
-rw-r--r--src/mod360.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mod360.cpp b/src/mod360.cpp
index a30aa65a7..8abda4cf7 100644
--- a/src/mod360.cpp
+++ b/src/mod360.cpp
@@ -17,6 +17,16 @@ double mod360(double const x)
return ret;
}
+/** Returns \a x wrapped around to between -180 and less than 180,
+ or 0 if \a x isn't finite.
+**/
+double mod360symm(double const x)
+{
+ double m = mod360(x);
+
+ return m < 180.0 ? m : m - 360.0;
+}
+
/*
Local Variables:
mode:c++