I need to round a float to the nearest .5, for example:
1.1 = 1
1.5 = 1.5
1.6 = 1.5
1.8 = 2
and so on. I really don't know how to do it. Any help would be greatly appreciated.
I need to round a float to the nearest .5, for example:
1.1 = 1
1.5 = 1.5
1.6 = 1.5
1.8 = 2
and so on. I really don't know how to do it. Any help would be greatly appreciated.