Originally Posted by Choonstertwo
Which numbers do you want to change? (i.e. Which part of the UI?)
|
not a part of a ui, this is for use either in xpbar, unitframe
Lua Code:
--number format func
local SVal = function(val)
if val > 1E10 then
return (floor(val/1E9)).."b"
elseif val > 1E9 then
return (floor((val/1E9)*10)/10).."b"
elseif val > 1E7 then
return (floor(val/1E6)).."m"
elseif val > 1E6 then
return (floor((val/1E6)*10)/10).."m"
elseif val > 1E4 then
return (floor(val/1E3)).."k"
else
return val
end
end
I have this for shortening numbers, so I was wondering if there was a code to make the numbers with spaces atleast everything below 100k