diff --git a/src/mod360.cpp b/src/mod360.cpp
index a30aa65a797d571a2b3c3f1f1e829ad4562978c2..13e9aa36a1e326b89cbadf092f5dad7d2f458311 100644 (file)
--- a/src/mod360.cpp
+++ b/src/mod360.cpp
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++
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 :