六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 53|回复: 0

javascript Math reference

[复制链接]

升级  21.33%

22

主题

22

主题

22

主题

秀才

Rank: 2

积分
82
 楼主| 发表于 2013-2-7 17:17:13 | 显示全部楼层 |阅读模式
javascript Math参考

Math Object MethodsFF: Firefox, N: Netscape, IE: Internet ExplorerMethod Description FF N IEabs(x) Returns the absolute value of a number 1 2 3acos(x) Returns the arccosine of a number 1 2 3asin(x) Returns the arcsine of a number 1 2 3atan(x) Returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians 1 2 3atan2(y,x) Returns the angle theta of an (x,y) point as a numeric value between -PI and PI radians 1 2 3ceil(x) Returns the value of a number rounded upwards to the nearest integer 1 2 3cos(x) Returns the cosine of a number 1 2 3exp(x) Returns the value of Ex 1 2 3floor(x) Returns the value of a number rounded downwards to the nearest integer 1 2 3log(x) Returns the natural logarithm (base E) of a number 1 2 3max(x,y) Returns the number with the highest value of x and y 1 2 3min(x,y) Returns the number with the lowest value of x and y 1 2 3pow(x,y) Returns the value of x to the power of y 1 2 3random() Returns a random number between 0 and 1 1 2 3round(x) Rounds a number to the nearest integer 1 2 3sin(x) Returns the sine of a number 1 2 3sqrt(x) Returns the square root of a number 1 2 3tan(x) Returns the tangent of an angle 1 2 3toSource() Represents the source code of an object 1 4 -valueOf() Returns the primitive value of a Math object 1 2 4Math Object PropertiesProperty Description FF N IE constructor A reference to the function that created the object 1 2 4E Returns Euler's constant (approx. 2.718) 1 2 3LN2 Returns the natural logarithm of 2 (approx. 0.693) 1 2 3LN10 Returns the natural logarithm of 10 (approx. 2.302) 1 2 3LOG2E Returns the base-2 logarithm of E (approx. 1.414) 1 2 3LOG10E Returns the base-10 logarithm of E (approx. 0.434) 1 2 3PI Returns PI (approx. 3.14159) 1 2 3prototype Allows you to add properties and methods to the object 1 2 4SQRT1_2 Returns the square root of 1/2 (approx. 0.707) 1 2 3SQRT2 Returns the square root of 2 (approx. 1.414) 1 2 3
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表