Code

Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
[inkscape.git] / src / mod360.cpp
index a30aa65a797d571a2b3c3f1f1e829ad4562978c2..13e9aa36a1e326b89cbadf092f5dad7d2f458311 100644 (file)
@@ -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++
@@ -26,4 +36,4 @@ double mod360(double const x)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :