Can I reduce the precision of a float number?
In all the searching I've been doing I saw only how to reduce the precision for printing the number. I do not need to print it.
I want, for example, to convert 13.2836 to 13.28. Without even rounding it.
Is it possible?
The standard warnings about doing precision arithmetic with floats applies, but you can do this:
float f = 13.2836; f = Math.floor(f * 100) / 100;