Hello, I have data coming in like 42.44, 28.69, 28.89, 22.22, etc., I need to round these numbers up for 0.5, like the result of rounding off the above numbers should be 42.50, 29.0, 29.0, 22.50. How do I do it? The above numbers are of type double. Thanks in advance Sreeni.
Using round() or floor() will not help me as round() would round off 42.44 to 42 and floor() will also round 42.44 to 42. In case the number 28.69, the round() would round off to 29 and floor() to 28. This is not I want, I want the numbers to get rounded up to next 0.50 as mentioned in the examples in my question.