您现在的位置:首页关于JS的文章

js 中 Math() 对象的方法

js 中 Math() 对象的方法

1.丢弃小数部分,保留整数部分parseInt(5/2)2.向上取整,有小数就整数部分加1Math.ceil(5/2)3,四舍五入.Math.round(5/2)4,向下取整Math.floor(5/2)Math 对象的方法方法描述abs(x)返回数的绝对值acos(x)返回数的反余弦值a...
  • 1
  • 共 1 页
微信二维码
召唤伊斯特瓦尔