I would like to round a series of number like this:
0 -> 0
0.1 -> 0
0.125 -> 0.25
0.25 -> 0.25
I have heard that I can use round(x*4)/4 to find the nearest 0.25 unit. However, there will be some problems at the boundary with this function
0.125 -> 0 (with round(x*4)/4)
Is there anyway I can do the above rounding correctly? Thanks