Js小数位处理的各类“四舍五入”(round,floor,ceil)

Math.round 进行四舍五入javascript Math.round(12.2) // 返回 12 Math.round(12.7) // 返回 13 Math.round(12.0) // 返回 12 Math.floor 一概舍去,仅保留整数。java Math.floor(12.2) // 返回 12 Math.floor(12.7) // 返回 12 Math.floor
相关文章
相关标签/搜索