摘要
Math.constant
Math.function()
常量
Math.E
常量e,自然对数的底数。
Math.LN10
10的自然对数。
Math.LN2
2的自然对数。
Math.LOG10E
以10为底的e的对数。
Math.LOG2E
以2为底的e的对数。
Math.PI
 
方法
静态函数
Math.abs()
计算绝对值。
Math.acos()
计算反余弦值。
Math.asin()
计算反正弦值。
Math.atan()
计算反正切值。
Math.atan2()
计算从X轴到一个点的角度。
Math.ceil()
描述
Math是一个对象,定义了引用有的算术函数和常量的属性。使用如下的语法就可以调用它们:
y = Math.sin(x);
area = radius * radius * Math.PI;
Math并不像Date和String那样是对象类。没有Math()构造函数,像Math.sin()这样的函数只是函数,不是对象的方法。
参阅
Numbert