I’m starting at the android and java now, and I have a problem.
I have a result x = 206.0548.
And y = 206, both of type double
How do I get the result is always rounded up to 210?
In other cases, assuming x = 203.5231 I wanted to round to 205.
If x = 201 to 205 round off.
If x = 198.25 round off to 200.
… thank you
Math.ceil(x/5) * 5;
I think. Look up the Math.ceil method as that is the best way to go.