3 ms·
The rules listed (1,2,6,7 round down; 3,4,8,9 round up). AFAIK these are also the official Eurozone cash rules for countries that choose not to circulate 1 and
by euroderf 2y ago
The rules listed (1,2,6,7 round down; 3,4,8,9 round up). AFAIK these are also the official Eurozone cash rules for countries that choose not to circulate 1 and 2 eurocent coins. (Altho of course, electronic transactions are exact to the penny.) So you might want to cover this use case.
- o-o- 2y agoSo basically Math.round((x*20))/20?
- Silphendio 2y agoShouldn't it be `round(x/5)*5` ?