取整办法
摘要:(1) parseInt 只保留整数部分 (舍弃小数部分) (2) Math.floor 向下取整 (3) ~~V 保持整数部分 前三种方法都属于向下取整的办法 (4) Math.ceil 向上取整 (5) Math.round 四舍五入 (5) Math.abs 取绝对值
阅读全文
posted @ 2022-03-28 23:51
posted @ 2022-03-28 23:51
posted @ 2022-03-13 23:51