Skip to content

Comment on Rounding Percentages

Comments

I'm afraid this introduces too much magic

Personally, "0%" doesn't mean "hasn't started" to me, it means "not enough progress has happened to reach 1%". Assuming I'm not alone with that, the rounding becomes a simple truncation `roundedPercent = int(percent)`

An implementation as simple as the concept, which is a good sign in my experience

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.