convert javascript number to css value -- maximum number of trailing decimals

Posted by philipp on Stack Overflow See other posts from Stack Overflow or by philipp
Published on 2012-03-28T17:07:19Z Indexed on 2012/03/28 17:29 UTC
Read the original article Hit count: 140

Filed under:
|

I am about to have some fun with the css transform matrix and javascript. At the moment everything is cool, except when a number becomes something like 0.000034e3344 after the to string conversion. Than the transform does not work. So I know that there is the

Number.toFixed()

method which actually solves the problem, but i ask myself how many trailing decimals make sense. So what is the highest value i can pass to the toFixed() method to get the most precise results?

EDIT:::

the exact number output was:

9.685539407532573e-20

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about css3