1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-20 10:17:39 +00:00
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

@@ -1,5 +1,4 @@
local class = require('class')
local Logger = require('logger')
local ChestProvider = class()

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)