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