The challenge is that a 9.99 score leads to a silver medal, even though 10.0 is printed as in HumanReadableFormatter we're rounding to a single decimal.
There are two approaches to this problem
Fix in the human formatter
Round differently everywhere
Separately, you could argue this is only a problem for scores near thresholds and not in other instances (e.g. 3.35 might be fine to round to 3.4, but 9.99 should be displayed as 9.9).
To keep things simple, I've added a property on the Score model and used the rounded-down version in the human-readable formatter.
Fixes #61.
The challenge is that a 9.99 score leads to a silver medal, even though 10.0 is printed as in
HumanReadableFormatter
we're rounding to a single decimal.There are two approaches to this problem
Separately, you could argue this is only a problem for scores near thresholds and not in other instances (e.g. 3.35 might be fine to round to 3.4, but 9.99 should be displayed as 9.9).
To keep things simple, I've added a property on the
Score
model and used the rounded-down version in the human-readable formatter.