mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 12:22:56 +08:00
Fix code formatting
This commit is contained in:
parent
14db813842
commit
2bbd12e39a
@ -4,8 +4,8 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Scoring;
|
||||
using static osu.Game.Users.User;
|
||||
using osu.Game.Utils;
|
||||
using static osu.Game.Users.User;
|
||||
|
||||
namespace osu.Game.Users
|
||||
{
|
||||
|
@ -3,22 +3,22 @@
|
||||
|
||||
namespace osu.Game.Utils
|
||||
{
|
||||
public static class FormatUtils
|
||||
{
|
||||
/// <summary>
|
||||
public static class FormatUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// Turns the provided accuracy into a percentage with 2 decimal places.
|
||||
/// Omits all decimal places when <paramref name="accuracy"/> equals 1d.
|
||||
/// Omits all decimal places when <paramref name="accuracy"/> equals 1d.
|
||||
/// </summary>
|
||||
/// <param name="accuracy">The accuracy to be formatted</param>
|
||||
/// <returns>formatted accuracy in percentage</returns>
|
||||
public static string FormatAccuracy(this double accuracy) => accuracy == 1 ? "100%" : $"{accuracy:0.00%}";
|
||||
public static string FormatAccuracy(this double accuracy) => accuracy == 1 ? "100%" : $"{accuracy:0.00%}";
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Turns the provided accuracy into a percentage with 2 decimal places.
|
||||
/// Omits all decimal places when <paramref name="accuracy"/> equals 100m.
|
||||
/// Omits all decimal places when <paramref name="accuracy"/> equals 100m.
|
||||
/// </summary>
|
||||
/// <param name="accuracy">The accuracy to be formatted</param>
|
||||
/// <returns>formatted accuracy in percentage</returns>
|
||||
public static string FormatAccuracy(this decimal accuracy) => accuracy == 100 ? "100%" : $"{accuracy:0.00}%";
|
||||
}
|
||||
}
|
||||
public static string FormatAccuracy(this decimal accuracy) => accuracy == 100 ? "100%" : $"{accuracy:0.00}%";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user