Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
o-o-
1y ago
0 comments
Save
Share
So basically Math.round((x*20))/20?
0 comments
3 comments · 1 top-level
top
newest
oldest
Silphendio
1y ago
· 2 in thread
Shouldn't it be `round(x/5)*5` ?
shiandow
1y ago
Depends, are you working in cents or whole euros/dollars?
falcor84
1y ago
In all use-cases I encountered, working with integer cents is much cleaner than decimals
j
/
k
navigate · click thread line to collapse