round

Math.floor() problem

Spent ages yesterday struggling with Math.floor() giving me unexpected results – Math.floor(1) was coming at as 0, Math.floor(2) was coming out as 1.
The problem arose when testing out a routine for getting the minimum number of coins to make up a value. Numbers that were tracing to the output window as integers were not being [...]