1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Merge pull request #21819 from bdach/fix-global-ranking-accuracy-display

Fix incorrect accuracy display on overall ranking view
This commit is contained in:
Dean Herbert 2022-12-28 04:47:15 +08:00 committed by GitHub
commit 5e8ca11ded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@ namespace osu.Game.Tests.Visual.Ranking
new UserStatistics
{
GlobalRank = 12_345,
Accuracy = 0.9899,
Accuracy = 98.99,
MaxCombo = 2_322,
RankedScore = 23_123_543_456,
TotalScore = 123_123_543_456,
@ -37,7 +37,7 @@ namespace osu.Game.Tests.Visual.Ranking
new UserStatistics
{
GlobalRank = 1_234,
Accuracy = 0.9907,
Accuracy = 99.07,
MaxCombo = 2_352,
RankedScore = 23_124_231_435,
TotalScore = 123_124_231_435,
@ -53,7 +53,7 @@ namespace osu.Game.Tests.Visual.Ranking
new UserStatistics
{
GlobalRank = 1_234,
Accuracy = 0.9907,
Accuracy = 99.07,
MaxCombo = 2_352,
RankedScore = 23_124_231_435,
TotalScore = 123_124_231_435,
@ -62,7 +62,7 @@ namespace osu.Game.Tests.Visual.Ranking
new UserStatistics
{
GlobalRank = 12_345,
Accuracy = 0.9899,
Accuracy = 98.99,
MaxCombo = 2_322,
RankedScore = 23_123_543_456,
TotalScore = 123_123_543_456,
@ -76,7 +76,7 @@ namespace osu.Game.Tests.Visual.Ranking
var statistics = new UserStatistics
{
GlobalRank = 12_345,
Accuracy = 0.9899,
Accuracy = 98.99,
MaxCombo = 2_322,
RankedScore = 23_123_543_456,
TotalScore = 123_123_543_456,
@ -93,7 +93,7 @@ namespace osu.Game.Tests.Visual.Ranking
var statistics = new UserStatistics
{
GlobalRank = null,
Accuracy = 0.9899,
Accuracy = 98.99,
MaxCombo = 2_322,
RankedScore = 23_123_543_456,
TotalScore = 123_123_543_456,

View File

@ -16,11 +16,11 @@ namespace osu.Game.Screens.Ranking.Statistics.User
protected override LocalisableString Label => UsersStrings.ShowStatsHitAccuracy;
protected override LocalisableString FormatCurrentValue(double current) => current.FormatAccuracy();
protected override LocalisableString FormatCurrentValue(double current) => (current / 100).FormatAccuracy();
protected override int CalculateDifference(double previous, double current, out LocalisableString formattedDifference)
{
double difference = current - previous;
double difference = (current - previous) / 100;
if (difference < 0)
formattedDifference = difference.FormatAccuracy();