local function shortenAmount(val)
if(val >= 1e7) then
return ("%sm"):format(round(val / 1e6))
elseif(val >= 1e6) then
return ("%sm"):format(round(val / 1e6, 2))
elseif(val >= 1e5) then
return ("%sk"):format(round(val / 1e3))
elseif(val >= 1e4) then
return ("%sk"):format(round(val / 1e3, 1))
else
return val
end
end
local function shortenAmount(val)
if(val >= 1e12) then
return ("%s兆"):format(round(val / 1e12, 2))
elseif(val >= 1e9) then
return ("%s亿"):format(round(val / 1e9,2))
elseif(val >= 1e4 ) then
return ("%s万"):format(round(val / 1e4, 2))
else
return val
end
end
欢迎光临 凯恩之角_暗黑破坏神3论坛_夺魂之镰 (https://bbs.d.163.com/) | Powered by Discuz! X3.3 |