Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
o-o-
· 2y ago · 0 comments
So basically Math.round((x*20))/20?
Comments
[–]
Silphendio
2y ago
Shouldn't it be `round(x/5)*5` ?
[–]
shiandow
2y ago
Depends, are you working in cents or whole euros/dollars?
[–]
falcor84
2y ago
In all use-cases I encountered, working with integer cents is much cleaner than decimals