I am currently figuring out how to round amounts like 8.3 to 8.5 or 8.6 to 9.0 with the Math.round method.
My current way to go is checking, if the initial value is smaller than the rounded value and then +.5 or -.5.
like this:
if(amountB < Math.round(amountB))
{
System.out.println(Math.round(amountB ) - .5);
}
But thats not working how I want it to, it always puts out 8.5, even when the input is 8.6.
Thanks for any advice.