diff options
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 16 | ||||
-rw-r--r-- | tracker-pt/point-filter.cpp | 8 |
2 files changed, 14 insertions, 10 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index df33735c..800e2480 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -222,22 +222,22 @@ function(otr_module n_) if(arg_BIN) if (APPLE) install(TARGETS "${n}" - RUNTIME DESTINATION ${opentrack-bin} - BUNDLE DESTINATION ${opentrack-bin} - LIBRARY DESTINATION ${opentrack-bin}/Library - RESOURCE DESTINATION ${opentrack-bin}/opentrack.app/Resource + RUNTIME DESTINATION "${opentrack-bin}" + BUNDLE DESTINATION "${opentrack-bin}" + LIBRARY DESTINATION "${opentrack-bin}/Library" + RESOURCE DESTINATION "${opentrack-bin}/opentrack.app/Resource" PERMISSIONS ${opentrack-perms-exec}) else() install(TARGETS "${n}" - RUNTIME DESTINATION ${opentrack-bin} - LIBRARY DESTINATION ${opentrack-libexec} + RUNTIME DESTINATION "${opentrack-bin}" + LIBRARY DESTINATION "${opentrack-libexec}" PERMISSIONS ${opentrack-perms-exec}) endif() else() # Plugins install(TARGETS "${n}" - RUNTIME DESTINATION ${opentrack-libexec} - LIBRARY DESTINATION ${opentrack-libexec} + RUNTIME DESTINATION "${opentrack-libexec}" + LIBRARY DESTINATION "${opentrack-libexec}" PERMISSIONS ${opentrack-perms-exec}) endif() diff --git a/tracker-pt/point-filter.cpp b/tracker-pt/point-filter.cpp index 85841993..2b32028b 100644 --- a/tracker-pt/point-filter.cpp +++ b/tracker-pt/point-filter.cpp @@ -12,6 +12,10 @@ void point_filter::reset() const PointOrder& point_filter::operator()(const PointOrder& input) { + using std::fmod; + using std::sqrt; + using std::pow; + if (!s.enable_point_filter) { t = std::nullopt; @@ -31,7 +35,7 @@ const PointOrder& point_filter::operator()(const PointOrder& input) constexpr int A = 1'000'000; double K = *s.point_filter_coefficient; f log10_pos = -2 + (int)K, rest = (f)(.999-fmod(K, 1.)*.9); - return A * std::pow((f)10, (f)-log10_pos) * rest; + return A * pow((f)10, (f)-log10_pos) * rest; ); f dist = 0; @@ -47,7 +51,7 @@ const PointOrder& point_filter::operator()(const PointOrder& input) return state_; f dt = (f)t->elapsed_seconds(); t->start(); - f delta = std::pow(dist, E) * C * dt; // gain + f delta = pow(dist, E) * C * dt; // gain //qDebug() << "gain" << std::min((f)1, delta); |