Math类常用方法

Math.abs()方法返回绝对值

Math.max()方法返回最大值

Math.min()方法返回最小值

Math.sqrt()计算平方根

Math.cbrt()计算立方

Math.pow()计算a的b次方

Math.random()*10 生成随机0-9的数字

posted @ 2020-06-03 08:34  蔡伟  阅读(218)  评论(0)    收藏  举报