I have a number variable that is between 0 and 100. It ccould be something like 83.333334.
I want to use Math.Round to round the number (e.g. Math.round(83.333334);). How can I do this so that the result is always divisible by five (i.e. in the set [0, 5, 10, 15… 85, 90, 95, 100])?
Divide by 5, round it, multiply by 5.
jsFiddle Demo