The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/math: Fix conversion warnings

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
d8970f25 32a893fd

+2 -2
+2 -2
src/xrt/auxiliary/math/m_lowpass_float.hpp
··· 49 49 * before initializing the filter with the first sample. 50 50 */ 51 51 explicit LowPassIIR(Scalar cutoff_hz, Value const &val) noexcept 52 - : state(val), time_constant(1.f / (2.f * M_PI * cutoff_hz)) 52 + : state(val), time_constant(static_cast<Scalar>(1.f / (2.f * M_PI * cutoff_hz))) 53 53 {} 54 54 55 55 /*! ··· 82 82 return; 83 83 } 84 84 // get dt in seconds 85 - Scalar dt = time_ns_to_s(timestamp_ns - filter_timestamp_ns); 85 + Scalar dt = static_cast<Scalar>(time_ns_to_s(timestamp_ns - filter_timestamp_ns)); 86 86 //! @todo limit max dt? 87 87 Scalar weighted = dt * weight; 88 88 Scalar alpha = weighted / (time_constant + weighted);