Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shorten hp/mana by k or m #1

Open
mwonng opened this issue Nov 12, 2020 · 0 comments
Open

shorten hp/mana by k or m #1

mwonng opened this issue Nov 12, 2020 · 0 comments

Comments

@mwonng
Copy link

mwonng commented Nov 12, 2020

i put a code which might be good or more friendly than AbbreviateLargeNumbers for target, especially for boss hp,hope it would be help.

local function FormatNumber(val)
    if val >= 10^6 then
        return string.format("%.2fm", val / 10^6)
    elseif val >= 10^3 then
        return string.format("%.1fk", val / 10^3)
    else
        return tostring(val)
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant