Fix loss of precision when computing accuracy

This commit is contained in:
Dan Balasescu 2022-12-05 19:08:50 +09:00
parent 486ea153fe
commit 9e64f8dab1

View File

@ -285,7 +285,7 @@ namespace osu.Game.Rulesets.Scoring
// We only extract scoring values from the score's statistics. This is because accuracy is always relative to the point of pass or fail rather than relative to the whole beatmap. // We only extract scoring values from the score's statistics. This is because accuracy is always relative to the point of pass or fail rather than relative to the whole beatmap.
extractScoringValues(scoreInfo.Statistics, out var current, out var maximum); extractScoringValues(scoreInfo.Statistics, out var current, out var maximum);
return maximum.BaseScore > 0 ? current.BaseScore / maximum.BaseScore : 1; return maximum.BaseScore > 0 ? (double)current.BaseScore / maximum.BaseScore : 1;
} }
/// <summary> /// <summary>