Originally Posted by
Nicke
Hi
I just started to develop in java at my company and ran into a rounding problem that i can't solve as i like.
Got this number, 69,1999999999998 i want to round so i get 69,20.
But the result end up 69.2. I want my number to keep the zero.
My code looks like this
.........
var number: int = 69,1999999999998
number = Math.round(100000 * number) / 100000;
//number = 69.2
Does anyone know what i should do?
FYI, i'm calculating amounts on articles and want to keep the correct decimal value for the currency denomination.