From 8a5bebb2b8946eee675c7fee4f7448d5d42e71b6 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Tue, 25 Mar 2008 22:12:45 +0000 Subject: 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) --- src/mod360.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mod360.cpp') 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++ -- cgit v1.2.3