This question has already been answered:
- Round the number to a given interval of 5 responses
How to round, for example, the number 2.35 to 2.5 and the number 3.76 to 4 with the help of JS? You need a dynamic system that could round the number to the nearest half, or to the whole number.