Javascript - Math 2019-06-19- 2022-01-05 Javascript-Math1234567891011121314151617Math.pow(2,53) //2的53次幂Math.round(.6) //1 四舍五入Math.ceil(.5) //1 向上取整Math.floor(.6) //0 向下取整Math.abs(-5) //5 绝对值Math.max(x,y,z) // 最大值Math.min(x,y,z) //最小值Math.random() // 生成一个0-1的随机数Math.PI // 圆周率Math.E //自然对数的底数Math.sqrt(3)//三的平方根Math.pow(3)//3的立方根Math.sin(o)三角函数,还有Math.cos,Math.atan等Math.log(10)//10的自然对数Math.log(100)/Math.LN10 //以10为底的100的对数Math.log(512)/Math.LN2 //以2为底的512对数Math.exp(3) // e的三次幂 I'm so cute. Please give me money.Post author: 彩鹏Post link: https://blog.gaocaipeng.com/2019/06/19/hpfm7k/Copyright Notice: All articles in this blog are licensed under unless otherwise stated.