diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-04-23 13:25:15 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-04-23 13:25:15 +0200 |
commit | 53214de869ac2a30ee19d7ea68c809fe7f7ef8e3 (patch) | |
tree | 83dc979f42a9f5718ecc95e88488abb98abda45c | |
parent | 6f93d32fba2c1ce1f074bc339c52c27894b39740 (diff) |
api: make NaN/Inf check work even with full fast math
-rwxr-xr-x[-rw-r--r--] | opentrack/tracker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp index 6411db40..d7070eb4 100644..100755 --- a/opentrack/tracker.cpp +++ b/opentrack/tracker.cpp @@ -65,7 +65,8 @@ void Tracker::t_compensate(const rmat& rmat, const double* xyz, double* output, static inline bool nanp(double value) { - return std::isnan(value) || std::isinf(value); + const volatile double x = value; + return std::isnan(x) || std::isinf(x); } static inline double elide_nan(double value, double def) |