WithinRange Filter¶
-
template<typename T, T MinVal, T MaxVal>
struct WithinRange¶ Filter that only accepts values within a specified range.
This filter propagates changes only when the new value falls within the specified inclusive range
[MinVal, MaxVal], useful for range validation.- Since
v0.1.0
// Example: Only propagate values within valid range [0, 100] Signal<int, 10, WithinRange<int, 0, 100>> percent(50);Warning
Only accepts arithmetic types (integral and floating-point).
MinValmust be less than or equal toMaxVal.
See Also¶
Numerical Filters - Overview