- 博客(3)
- 收藏
- 关注
原创 保留小数后几位
const toFixed = (n, fixed) => ~~(Math.pow(10, fixed) * n) / Math.pow(10, fixed);// ExamplestoFixed(25.198726354, 1); // 25.1toFixed(25.198726354, 2); // 25.19toFixed(25.198726354, 3); // 25.198toFixed(25.198726354, 4); // 2.
2022-04-14 11:23:52
69
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人