mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Fix: floating point errors
Signed-off-by: CaffeeLake <PascalCoffeeLake@gmail.com>
This commit is contained in:
parent
ca0f09733a
commit
ad4b5f6ded
@ -238,9 +238,9 @@ namespace osu.Game.Utils
|
||||
{
|
||||
// Round multiplier values away from 1.00x to two significant digits.
|
||||
if (scoreMultiplier > 1)
|
||||
scoreMultiplier = Math.Ceiling(scoreMultiplier * 100) / 100;
|
||||
scoreMultiplier = Math.Ceiling(Math.Round(scoreMultiplier * 100, 12)) / 100;
|
||||
else
|
||||
scoreMultiplier = Math.Floor(scoreMultiplier * 100) / 100;
|
||||
scoreMultiplier = Math.Floor(Math.Round(scoreMultiplier * 100, 12)) / 100;
|
||||
|
||||
return scoreMultiplier.ToLocalisableString("0.00x");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user