diff --git a/matrix/helper_functions.hpp b/matrix/helper_functions.hpp index ce8ba11456..43c28d571d 100644 --- a/matrix/helper_functions.hpp +++ b/matrix/helper_functions.hpp @@ -6,8 +6,6 @@ #include #endif -#include - namespace matrix { @@ -35,7 +33,7 @@ Type wrap_pi(Type x) x -= Type(2 * M_PI); if (c++ > 100) { - return std::numeric_limits::quiet_NaN(); + return INFINITY; } } @@ -45,7 +43,7 @@ Type wrap_pi(Type x) x += Type(2 * M_PI); if (c++ > 100) { - return std::numeric_limits::quiet_NaN(); + return INFINITY; } } @@ -65,7 +63,7 @@ Type wrap_2pi(Type x) x -= Type(2 * M_PI); if (c++ > 100) { - return std::numeric_limits::quiet_NaN(); + return INFINITY; } } @@ -75,7 +73,7 @@ Type wrap_2pi(Type x) x += Type(2 * M_PI); if (c++ > 100) { - return std::numeric_limits::quiet_NaN(); + return INFINITY; } }