ihtml5 / blog

个人博客 源码阅读*前端实践 My Blog
MIT License
6 stars 0 forks source link

js中Math对象的几个常用方法简介 #13

Open ihtml5 opened 8 years ago

ihtml5 commented 8 years ago

Math.floor(number)

返回最接近且小于number的整数

Math.ceil(number)

返回最近接且大宇number的整数

Math.round(number)

四舍五入

Math.abs(number)

返回number的绝对值


[参考链接]

  1. Mdn math doc