File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Microsoft.Toolkit.Uwp.UI.Animations/Extensions/System Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ internal static class FloatExtensions
1919 [ Pure ]
2020 public static string ToCompositionString ( this float number )
2121 {
22- var defaultString = number . ToString ( ) ;
22+ var defaultString = number . ToString ( System . Globalization . CultureInfo . InvariantCulture ) ;
2323 var eIndex = defaultString . IndexOf ( 'E' ) ;
2424
2525 // If the default string representation is not in scientific notation, we can use it
@@ -32,7 +32,7 @@ public static string ToCompositionString(this float number)
3232 var exponent = int . Parse ( defaultString . Substring ( eIndex + 1 ) ) ;
3333 if ( exponent >= 0 )
3434 {
35- return number . ToString ( $ "F0") ;
35+ return number . ToString ( $ "F0", System . Globalization . CultureInfo . InvariantCulture ) ;
3636 }
3737
3838 // Otherwise, we need to print it with the right number of decimals
@@ -42,7 +42,7 @@ public static string ToCompositionString(this float number)
4242 - 3 : // Minus the sign, dot and first number of the mantissa if negative
4343 - 2 ) ; // Minus the dot and first number of the mantissa otherwise
4444
45- return number . ToString ( $ "F{ decimalPlaces } ") ;
45+ return number . ToString ( $ "F{ decimalPlaces } ", System . Globalization . CultureInfo . InvariantCulture ) ;
4646 }
4747 }
4848}
You can’t perform that action at this time.
0 commit comments