Skip to content

Commit cc0a223

Browse files
committed
enhance: use G3 instead of N3 to format file size in double
1 parent a687de3 commit cc0a223

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Converters/LongConverters.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ public static class LongConverters
1010
return $"{bytes:N0} B";
1111

1212
if (bytes < MB)
13-
return $"{(bytes / KB):N3} KB ({bytes:N0})";
13+
return $"{(bytes / KB):G3} KB ({bytes:N0})";
1414

1515
if (bytes < GB)
16-
return $"{(bytes / MB):N3} MB ({bytes:N0})";
16+
return $"{(bytes / MB):G3} MB ({bytes:N0})";
1717

18-
return $"{(bytes / GB):N3} GB ({bytes:N0})";
18+
return $"{(bytes / GB):G3} GB ({bytes:N0})";
1919
});
2020

2121
private const double KB = 1024;

0 commit comments

Comments
 (0)