常用函数 Math 类 和 String 类是常用的两种函数
1-1 Math函数:
Math.E | 比任何其他值都更接近 e(即自然对数的底数)的 |
|
Math.PI | 比任何其他值都更接近 pi(即圆周率)的 |
|
Math.abs(b) |
返回绝对值 |
|
Math.ceil(a) |
|
|
Math.floor(c) |
|
|
Math.pow(a , b) |
|
|
Math.min(a,b) |
|
|
Math.sqrt(a) |
|
|
Math.random() |
|