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
19
19
[ Pure ]
20
20
public static string ToCompositionString ( this float number )
21
21
{
22
- var defaultString = number . ToString ( ) ;
22
+ var defaultString = number . ToString ( System . Globalization . CultureInfo . InvariantCulture ) ;
23
23
var eIndex = defaultString . IndexOf ( 'E' ) ;
24
24
25
25
// 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)
32
32
var exponent = int . Parse ( defaultString . Substring ( eIndex + 1 ) ) ;
33
33
if ( exponent >= 0 )
34
34
{
35
- return number . ToString ( $ "F0") ;
35
+ return number . ToString ( $ "F0", System . Globalization . CultureInfo . InvariantCulture ) ;
36
36
}
37
37
38
38
// Otherwise, we need to print it with the right number of decimals
@@ -42,7 +42,7 @@ public static string ToCompositionString(this float number)
42
42
- 3 : // Minus the sign, dot and first number of the mantissa if negative
43
43
- 2 ) ; // Minus the dot and first number of the mantissa otherwise
44
44
45
- return number . ToString ( $ "F{ decimalPlaces } ") ;
45
+ return number . ToString ( $ "F{ decimalPlaces } ", System . Globalization . CultureInfo . InvariantCulture ) ;
46
46
}
47
47
}
48
48
}
You can’t perform that action at this time.
0 commit comments