We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea6ce57 commit 7cabea1Copy full SHA for 7cabea1
src/CommunityToolkit.Maui.Core/Extensions/ColorConversionExtensions.shared.cs
@@ -16,7 +16,8 @@ public static class ColorConversionExtensions
16
/// <returns></returns>
17
static string ToPercentage(this float percentage)
18
{
19
- return Math.Round(percentage, 2, MidpointRounding.ToEven).ToString("0%");
+ var toEvenRounded = Math.Round(percentage, 2, MidpointRounding.ToEven);
20
+ return FormattableString.Invariant($"{toEvenRounded:0%}");
21
}
22
23
/// <summary>
0 commit comments