Use format string for double instead of Math.Round.

This commit is contained in:
Huo Yaoyuan
2017-10-15 16:44:15 +08:00
parent 192ebe776f
commit 9b3676c562
3 changed files with 7 additions and 6 deletions

View File

@ -31,7 +31,7 @@ namespace osu.Game.Overlays.BeatmapSet
beatmap = value;
var rate = (float)beatmap.OnlineInfo.PassCount / beatmap.OnlineInfo.PlayCount;
successPercent.Text = $"{Math.Round(rate * 100)}%";
successPercent.Text = rate.ToString("P0");
successRate.Length = rate;
percentContainer.ResizeWidthTo(successRate.Length, 250, Easing.InOutCubic);