i'm looking for a simple code of function on java to round some decimals,
Example : the input number will always be on this format #.## so the code should do this :
input 100.00 result 100.00 rounded by 0.00
input 100.01 result 100.00 rounded by -0.01
input 100.02 result 100.00 rounded by -0.02
input 100.03 result 100.05 rounded by +0.02
input 100.04 result 100.05 rounded by +0.01
i'm not sure if there is a java function that can provide this result.