Make categoryDifficulties return doubles to improve decimal accuracy

This commit is contained in:
smoogipoo
2017-11-21 19:54:53 +09:00
parent decee415dd
commit f9ad4b6acb
8 changed files with 22 additions and 21 deletions

View File

@ -259,7 +259,7 @@ namespace osu.Game.Tests.Visual
if (calculator == null)
return;
var attributes = new Dictionary<string, string>();
var attributes = new Dictionary<string, double>();
double performance = calculator.Calculate(attributes);
text.Text = $"{score.User.Username} -> online: {score.PP:n2}pp | local: {performance:n2}pp";
@ -364,12 +364,12 @@ namespace osu.Game.Tests.Visual
var diffCalc = ruleset.CreateDifficultyCalculator(beatmap.Beatmap, activeMods);
if (diffCalc != null)
{
var categories = new Dictionary<string, string>();
var categories = new Dictionary<string, double>();
double totalSr = diffCalc.Calculate(categories);
totalText.Text = $"Star rating: {totalSr:n2}";
foreach (var kvp in categories)
categoryTexts.Add(new OsuSpriteText { Text = $"{kvp.Key}: {kvp.Value}" });
categoryTexts.Add(new OsuSpriteText { Text = $"{kvp.Key}: {kvp.Value:n2}" });
}
informationCache.Validate();