1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 02:46:43 +08:00

Update dependencies

This commit is contained in:
Andrei Zavatski 2019-09-29 15:02:33 +03:00
parent 5314f76fda
commit 883ee9851a
3 changed files with 4 additions and 5 deletions

View File

@ -51,7 +51,7 @@ namespace osu.Game.Tests.Visual.UserInterface
public DrawableNumber(long value)
{
this.value = value;
Text = HumanizerUtils.ToMetric(value);
Text = HumanizerUtils.ToReadableString(value);
}
}
}

View File

@ -98,7 +98,7 @@ namespace osu.Game.Overlays.Rankings.Tables
{
this.value = value;
Text = HumanizerUtils.ToMetric(value);
Text = HumanizerUtils.ToReadableString(value);
}
}

View File

@ -32,7 +32,7 @@ namespace osu.Game.Utils
/// </summary>
/// <param name="input">The number to be humanized.</param>
/// <returns>Simplified number with a suffix.</returns>
public static string ToMetric(long input)
public static string ToReadableString(long input)
{
const int k = 1000;
@ -42,8 +42,7 @@ namespace osu.Game.Utils
int i = (int)Math.Floor(Math.Round(Math.Log(input, k)));
return $"{input / Math.Pow(k, i):F} {suffixes[i]}";
}
private static readonly string[] suffixes = new[]
private static readonly string[] suffixes =
{
"",
"k",