I want to round a number to 4 decimals. I have done that :
roundedNumber = (double)(Math.round(roundedNumber)*10000)/10000;
It doesn't work with a number such as : 0.20425
.
I am getting the following output: 0.0
What should I do to get: 0.2042
?