Comment by emerongi
2 years ago
The author apparently went back to using a loop after recognizing that it's not readable: https://programming.guide/java/formatting-byte-size-to-human...
Notably, it's still slightly better than the first code example in the original article, as it takes the rounding bug into account.
No comments yet
Contribute on Hacker News ↗