erosson / swarm-numberformat

Format large numbers in several human-readable ways. Designed for incremental games like swarmsim.
https://erosson.github.io/swarm-numberformat/
MIT License
89 stars 10 forks source link

numbers below minSuffix shouldn't be rounded based on sigfigs #13

Closed erosson closed 7 years ago

erosson commented 7 years ago

we're showing that many zeroes anyway.

that is, formatShort(12345, {minSuffix=1e5}) should be 12,345, not 12,300

https://www.reddit.com/r/swarmsim/comments/5o9tc7/bugenergy_displaylepidoptera_bug/?st=iy0iyo7c&sh=b240cba9