SlidingAverage.push

Pushes another value to the sliding window, overwriting the oldest one if the sliding window has reached its maximum size. Calculates the new average, stores it, and returns it.

class SlidingAverage(T)
real
push
()

Parameters

value T

The value to into the sliding window

Return Value

Type: real

new average

Meta