summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-04-23 13:25:15 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-04-23 13:25:15 +0200
commit53214de869ac2a30ee19d7ea68c809fe7f7ef8e3 (patch)
tree83dc979f42a9f5718ecc95e88488abb98abda45c /opentrack
parent6f93d32fba2c1ce1f074bc339c52c27894b39740 (diff)
api: make NaN/Inf check work even with full fast math
Diffstat (limited to 'opentrack')
-rwxr-xr-x[-rw-r--r--]opentrack/tracker.cpp3
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)