0
0
mirror of https://github.com/hexparrot/mineos synced 2025-10-06 00:02:56 +02:00

corrected a huge clustermess of bad commits

This commit is contained in:
William Dizon
2015-02-11 15:46:41 -07:00
parent f5c3e09261
commit 6ec4caf22c

View File

@@ -1040,6 +1040,8 @@ function bytes_to_mb(bytes){
//http://stackoverflow.com/a/18650828
if (bytes == 0)
return '0B';
else if (bytes < 1024)
return bytes + 'B';
var k = 1024;
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
@@ -1047,3 +1049,4 @@ function bytes_to_mb(bytes){
return (bytes / Math.pow(k, i)).toPrecision(3) + sizes[i];
}