js中,小数相乘后得到的结果是类似12321321.000000001这么长的数字。
解决方法:
1)Math.floor() 可以取整;
2)使用bignumber.js进行数值计算
https://github.com/MikeMcl/bignumber.js
js中,小数相乘后得到的结果是类似12321321.000000001这么长的数字。
解决方法:
1)Math.floor() 可以取整;
2)使用bignumber.js进行数值计算
https://github.com/MikeMcl/bignumber.js