So, like officially, i have literal nightmares about situations like this. I wrote - or at least inherited and rewrote - most of the original number shortening and formatting logic in Apex. It's been mostly replaced by a new system now, but the guts are mostly the same, so I have great empathy both for my teammate who wrote this code and for you having experienced what I guess I'd call a "quirk" of the system.
And - having done number shortening and formatting on another game as well - I can say that is probably one of the most complex and most "GOTCHA!" prone systems you can imagine. Largely because there's way, way more subjectivity than there might seem. Truncating trailing zeros, for example. 1.20K makes sense. But 1.20 makes less sense. Sometimes you want to round up.
This was probably a case where round down was better, but like, let's say you were 1 CM short, would 1,199 really make sense to round to 1.19 rather 1.20? It makes sense but also doesn't. It's m...
Read more