There is variable amount of double type with value 269.80000000000001
I need truncate it to 2 decimals.
double result1 = round(amount * 100) / 100;
double result2 = (double)trunc(amount * 100) / 100;
after that result1 and result2 is still equals 269.80000000000001
Please tell me how truncate it to 2 decimals and why methods above does not work?