SignificantDigits Filter¶
-
template<typename T, size_t Digits>
struct SignificantDigits¶ Filter that rounds to specified significant digits before comparison.
This filter rounds both old and new values to the specified number of significant digits before comparing, propagating only when the rounded values differ.
- Since
v0.1.0
// Example: Round to 3 significant digits before comparison Signal<float, 10, SignificantDigits<float, 3>> sensor(0.0);Warning
Only accepts floating-point types (
float,double).Digitsmust be greater than 0.
See Also¶
Numerical Filters - Overview