Quantcast WoWInterface - View Single Post - MikScrollingBattleText 5.7 for MoP
View Single Post
07-21-12, 01:23 PM   #10
A Theradrim Guardian
Coldkil's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 63
Originally Posted by Mikord View Post
For shortening and rounding the numbers, would you guys prefer the nearest thousand or nearest hundred?

For example, 32,765 becomes 33k (nearest thousand) or 32.8k (nearest hundred)?
this is the code i'm using
lib.siValue = function(val)
	if(val >= 1e6) then
		return ('%.1f'):format(val / 1e6):gsub('%.', 'm')
	elseif(val >= 1e4) then
		return ("%.1f"):format(val / 1e3):gsub('%.', 'k')
		return val
so i prefer the nearest hundred would be awesome if the string format could be user-defined instead of fixated. I don't know how complicated would be that anyway