IsFinite Filter

template<typename T>
struct IsFinite

Filter that only accepts finite floating-point values (not NaN or Inf).

This filter propagates changes only when the new value is a valid finite number, filtering out NaN (Not a Number) and Infinity values.

Since

v0.1.0

// Example: Only propagate valid sensor readings
Signal<float, 10, IsFinite<float>> sensor(0.0);

Warning

Only accepts floating-point types (float, double).

Template Parameters:
typename T

Floating-point type.

Public Functions

inline bool operator()(const T &old_value, const T &new_value) const

See Also