Used fixed notation, rather than the classic Math.round() rounding idiom.

This commit is contained in:
Michael Jumper
2013-06-25 14:38:44 -07:00
parent a902155a59
commit 6efb7b8bde

View File

@@ -776,13 +776,13 @@ GuacUI.Client.attach = function(guac) {
function getSizeString(bytes) {
if (bytes > 1000000000)
return Math.round(bytes / 100000000)/10 + " GB";
return (bytes / 1000000000).toFixed(1) + " GB";
else if (bytes > 1000000)
return Math.round(bytes / 100000)/10 + " MB";
return (bytes / 1000000).toFixed(1) + " MB";
else if (bytes > 1000)
return Math.round(bytes / 100)/10 + " KB";
return (bytes / 1000).toFixed(1) + " KB";
else
return bytes + " B";