171
rated 0 times
[
173]
[
2]
/ answers: 1 / hits: 194042
/ 14 Years ago, sun, february 6, 2011, 12:00:00
I am trying to truncate decimal numbers to decimal places. Something like this:
5.467 -> 5.46
985.943 -> 985.94
toFixed(2)
does just about the right thing but it rounds off the value. I don't need the value rounded off. Hope this is possible in javascript.
More From » floating-point