2020年6月7日

JavaScript——math对象

摘要: 1、Math.PI 返回π的值 2、Math.round(a)对a四舍五入取近似值(整数);Math.pow(x,y)求x的y次幂;Math.sqrt(a)求a 的平方根;Math.abs(a)求a的绝对值 3、Math.ceil(a)取a上舍入整数(即取整+1);Math.floor(a)取a下舍 阅读全文

posted @ 2020-06-07 20:34 swowoy 阅读(93) 评论(0) 推荐(0) 编辑

导航