Code

Major overhaul of the selector tool's internals to improve handling of transformation...
[inkscape.git] / src / mod360.cpp
index a30aa65a797d571a2b3c3f1f1e829ad4562978c2..8abda4cf7bba906ad76e6dcf8d2c7f6c5d8e2e73 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++