modulo Helper¶
-
template<size_t MaxDeps = 8, typename Source>
auto RxESP32::Helpers::Numerical::modulo(Source &source, decltype(source.get()) modulus, const typename Computed<decltype(source.get()), 1, MaxDeps>::Options &options = {})¶ Calculate modulus (remainder) of source value.
Creates a Computed that returns the modulus of the source value.
- Since
v0.1.0
Signal<int> value(10); auto mod_value = modulo(value, 3); Serial.println(mod_value.get()); // 1 value.set(14); Serial.println(mod_value.get()); // 2Warning
Only accepts arithmetic types (integral and floating-point).
See Also¶
Numerical Helpers - Overview