Instantly share code, notes, and snippets.
0.1 + 0.2 > 0.30000000000000004
解决方法,整数没有这个问题,所以先变成整数,在运算。
复杂问题或者不想思考的时候,是可以使用 number-precision 解决。