The average_of_x statistics use the to_i method to round the average, which results in truncation, for example:
Here the counting times are 4.81, 4.50, and 5.20, which average to 4.836667.
For comparison, the WCA uses rounding for calculation of official averages, for example, see the WR average:
4.72, 4.72, and 3.99 average to 4.476667, but the WCA rounds this to 4.48.
I fixed this by replacing to_i with round in the average function.
(P.S. thanks to Keon Wilson for noticing this issue)
The average_of_x statistics use the
Here the counting times are 4.81, 4.50, and 5.20, which average to 4.836667.
to_i
method to round the average, which results in truncation, for example:For comparison, the WCA uses rounding for calculation of official averages, for example, see the WR average:
4.72, 4.72, and 3.99 average to 4.476667, but the WCA rounds this to 4.48.
I fixed this by replacing
to_i
withround
in theaverage
function.(P.S. thanks to Keon Wilson for noticing this issue)