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.
The value to into the sliding window
new average
See Implementation
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.