Skip to content

Instantly share code, notes, and snippets.

@freebaser
Created September 15, 2013 01:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freebaser/4e76678a3cd542020612 to your computer and use it in GitHub Desktop.
Save freebaser/4e76678a3cd542020612 to your computer and use it in GitHub Desktop.
diff --git a/FreebTip/tip.lua b/FreebTip/tip.lua
index 0a1aeda..2d47123 100644
--- a/FreebTip/tip.lua
+++ b/FreebTip/tip.lua
@@ -109,9 +109,9 @@ local classification = {
local numberize = function(val)
if(val >= 1e6) then
- return ("%dm"):format(val / 1e6)
+ return ("%.0fm"):format(val / 1e6)
elseif(val >= 1e3) then
- return ("%dk"):format(val / 1e3)
+ return ("%.0fk"):format(val / 1e3)
else
return ("%d"):format(val)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment