taiyang2014

JavaScript标准库之 - Math

属性

Math.E
欧拉常数,也是自然对数的底数, 约等于 2.718.
Math.LN2
2的自然对数, 约等于0.693.
Math.LN10
10的自然对数, 约等于 2.303.
Math.LOG2E
以2为底E的对数, 约等于 1.443.
Math.LOG10E
以10为底E的对数, 约等于 0.434.
Math.PI
圆周率,一个圆的周长和直径之比,约等于 3.14159.
Math.SQRT1_2
1/2的平方根, 约等于 0.707.
Math.SQRT2
2的平方根,约等于 1.414.
返回x的绝对值.
返回x的反余弦值.
返回x的反双曲余弦值.
返回x的反正弦值.
返回x的反双曲正弦值.
以介于 -PI/2 与 PI/2 弧度之间的数值来返回 x 的反正切值.
返回 x 的反双曲正切值.
返回 y/x 的反正切值.
返回x的立方根.
返回x向上取整后的值.
Returns the number of leading zeroes of a 32-bit integer.
返回x的余弦值.
返回x的双曲余弦值.
返回 Ex, 当x为参数,  E 是欧拉常数 (2.718...), 自然对数的底.
返回 exp(x)-1 的值.
返回小于x的最大整数。
Returns the nearest single precision float representation of a number.
Returns the square root of the sum of squares of its arguments.
Returns the result of a 32-bit integer multiplication.
Returns the natural logarithm (loge, also ln) of a number.
Returns the natural logarithm of 1 + x (loge, also ln) of a number.
Returns the base 10 logarithm of x.
Returns the base 2 logarithm of x.
返回0个到多个数值中最大值.
返回0个到多个数值中最小值.
返回x的y次幂.
返回0到1之间的伪随机数.
返回四舍五入后的整数.
返回x的符号函数, 判定x是正数,负数还是0.
返回正弦值.
返回x的双曲正弦值.
返回x的平方根.
返回x的正切值.
返回x的双曲正切值.
Math.toSource() 
返回字符串 "Math".
返回x的整数部分,去除小数. 

posted on 2017-08-21 17:41  taiyang2014  阅读(228)  评论(0编辑  收藏  举报

导航