Round a float to n decimal places.
in
Programming Questions
•
10 months ago
Hi, I'm displaying some text that I need to round to the nearest second decimal place
For example:
x = 1.000000000000000000000000000000000000000001
y = 1.10000000000000000000000001
a = x + y
roundDecimal(a);
a = 1.10
Is there anyway to do this?
Cheers
1