Commit 5b9d58ca authored by Jurgen's avatar Jurgen

function ShortValue, fixed various numberPrefixStyles.

parent d919e379
......@@ -50,7 +50,7 @@ local shortValueFormat
local function ShortValue(number, noDecimal)
shortValueFormat = (noDecimal and "%.0f%s" or format("%%.%df", E.db.general.decimalLength or 1))
if E.db.general.numberPrefixStyle == "METRIC" then
if abs(v) >= 1e12 then
if abs(number) >= 1e12 then
return format("%.1f%s", number / 1e12, "T")
elseif abs(number) >= 1e9 then
return format("%.1f%s", number / 1e9, "G")
......@@ -70,7 +70,7 @@ local function ShortValue(number, noDecimal)
return format("%.0f", number)
end
elseif E.db.general.numberPrefixStyle == "KOREAN" then
if abs(v) >= 1e8 then
if abs(number) >= 1e8 then
return format("%.1f%s", number / 1e8, "억")
elseif abs(number) >= 1e4 then
return format("%.1f%s", number / 1e4, "만")
......@@ -80,7 +80,7 @@ local function ShortValue(number, noDecimal)
return format("%.0f", number)
end
elseif E.db.general.numberPrefixStyle == "GERMAN" then
if abs(v) >= 1e12 then
if abs(number) >= 1e12 then
return format("%.1f%s", number / 1e12, "Bio")
elseif abs(number) >= 1e9 then
return format("%.1f%s", number / 1e9, "Mrd")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment