Js tutorial Math
属性
-
欧拉常数,也是自然对数的底数,约等于
2.718。 -
2的自然对数,约等于0.693。 -
10的自然对数,约等于2.303。 -
以
2为底的E的对数,约等于1.443。 -
以
10为底的E的对数,约等于0.434。 -
圆周率,一个圆的周长和直径之比,约等于
3.14159。 -
二分之一 ½ 的平方根,同时也是
2的平方根的倒数 12,约等于0.707。 -
2的平方根,约等于1.414。
方法
Math.abs()Math.acos()Math.acosh()Math.asin()Math.asinh()Math.atan()Math.atan2()Math.atanh()Math.cbrt()Math.ceil()Math.clz32()Math.cos()Math.cosh()Math.exp()Math.exp() 函数返回ex,x表示参数Math.expm1()Math.expm1()函数返回Ex - 1, 其中x是该函数的参数,E是自然对数的底数2.718281828459045.Math.floor()Math.fround()Math.hypot()Math.imul()Math.log()Math.log10()Math.log1p()Math.log2()Math.max()Math.min()Math.pow()Math.random()Math.round()Math.sign()Math.sin()Math.sinh()Math.sqrt()Math.tan()Math.tanh()Math.trunc()