Missed the Modulas.

360 // 360 = 0

and

370 // 360 = 10

Also, keep in mind it's using a 3 sample running average.
So starting at 350, and a sample of 20, the difference is 30 and it will move 1/3 of that, or 10.
So it ends up at 360(0) after 1 sample.
<br>