addValue
addValue(
rollingAverage,value):ImmutableRollingAverage
Defined in: math/fp/rolling-average.ts:53
Adds a new value to the rolling average. If the number of values exceeds the maximum size, the oldest value is removed.
Parameters
rollingAverage
The current state of the rolling average
value
number
The new value to add to the rolling average
Returns
An object containing a new instance of ImmutableRollingAverage with the updated values