garrysmod
garrysmod copied to clipboard
Added string.NiceNumber() to abbreviate large numbers
Added string.NiceNumber() to abbreviate large numbers Examples:
string.NiceNumber( 69420 ) --> "69.42K"
string.NiceNumber( -123456789 ) --> "-123.46M"
Are you sure double can represent the number with the largest suffix?
im not sure i understand? there is no need to store the whole number because it will be rounded significantly anyway
it works up to 1e+89 until it starts just adding 0's before the last prefix
It seems feature-less, perhaps being able to define the character(s) used etc. for it might be a good idea.
It seems feature-less, perhaps being able to define the character(s) used etc. for it might be a good idea.
those characters are the well-known standard which almost everything uses
It seems feature-less, perhaps being able to define the character(s) used etc. for it might be a good idea.
those characters are the well-known standard which almost everything uses
This does not work well together with localized content.