会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
泥wawa
博客园
首页
新随笔
联系
订阅
管理
2015年11月19日
JavaScript中的Math.ceil()、Math.round()、Math.floor()
摘要: 1. Math.ceil():向上取整(指取大于该浮点数的最小整数)2. Math.round():四舍五入取整(注意:当该浮点数距离两端整数一样时,取较大的那个整数,如Math.round(-1.5)=-1)3. Math.floor():向下取整(指取小于该浮点数的最大整数)
阅读全文
posted @ 2015-11-19 10:30 泥wawa
阅读(170)
评论(0)
推荐(0)
编辑
公告