mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 02:46:43 +08:00
Update dependencies
This commit is contained in:
parent
5314f76fda
commit
883ee9851a
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ namespace osu.Game.Overlays.Rankings.Tables
|
||||
{
|
||||
this.value = value;
|
||||
|
||||
Text = HumanizerUtils.ToMetric(value);
|
||||
Text = HumanizerUtils.ToReadableString(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user