mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Ensure rounding is still applied in non-midpoint cases
This commit is contained in:
parent
a06d806fb9
commit
8b504bb5ac
@ -75,11 +75,11 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
// so the easiest way is to cycle between downwards and upwards rounding as we process events.
|
||||
if (Math.Abs(binOffset - (int)binOffset) == 0.5)
|
||||
{
|
||||
binOffset += Math.Sign(binOffset) * (roundUp ? 1 : 0);
|
||||
binOffset = (int)binOffset + Math.Sign(binOffset) * (roundUp ? 1 : 0);
|
||||
roundUp = !roundUp;
|
||||
}
|
||||
|
||||
bins[timing_distribution_centre_bin_index + (int)binOffset]++;
|
||||
bins[timing_distribution_centre_bin_index + (int)Math.Round(binOffset, MidpointRounding.AwayFromZero)]++;
|
||||
}
|
||||
|
||||
int maxCount = bins.Max();
|
||||
|
Loading…
Reference in New Issue
Block a user