How can you implement a rounding function which will round all numbers as usual except 0.5 or any odd multiple of it down to the nearest integer?
For example:
2.899
is to be rounded up to3.0
2.332
is to be rounded down to2.0
2.5
is also to be rounded down to2.0
(and NOT3.0
)