This commit is contained in:
kepler155c@gmail.com
2017-04-15 23:39:15 -04:00
parent a074213b7c
commit 4546b9c726
5 changed files with 59 additions and 113 deletions

View File

@@ -357,9 +357,9 @@ end
--[[ String functions ]] --
function Util.toBytes(n)
if n >= 1000000 then
if n >= 1000000 or n <= -1000000 then
return string.format('%sM', Util.round(n/1000000, 1))
elseif n >= 1000 then
elseif n >= 1000 or n <= -1000 then
return string.format('%sK', Util.round(n/1000, 1))
end
return tostring(n)