Treatment saturatingAdd

std/ops/num::saturatingAdd


Generics

◻ N: SaturatingAdd

Inputs

⇥ a: Stream<N>
⇥ b: Stream<N>

Outputs

↦ sum: Stream<N>


Add values from two streams, saturating to bounds.

Values passed through a & b are added and send in sum. This treatment is infaillible and saturate to the closest bound, minimal or maximal, if a + b is out of bounds for the data type.