Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So basically Math.round((x*20))/20?


Shouldn't it be `round(x/5)*5` ?


Depends, are you working in cents or whole euros/dollars?


In all use-cases I encountered, working with integer cents is much cleaner than decimals




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: