首页 > 其他 > 详细

math方法集合

时间:2015-12-24 16:18:22      阅读:212      评论:0      收藏:0      [点我收藏+]

math.abs(x)     返回数的绝对值。
math.acos(x)     返回数的反余弦值。
math.asin(x)     返回数的反正弦值。
math.atan(x)     以介于 -PI/2 与 PI/2 弧度之间的数值来返回 x 的反正切值。
math.atan2(y,x)     返回从 x 轴到点 (x,y) 的角度(介于 -PI/2 与 PI/2 弧度之间)。
math.ceil(x)     对数进行上舍入。
math.cos(x)     返回数的余弦。
math.exp(x)     返回 e 的指数。
math.floor(x)     对数进行下舍入。
math.log(x)     返回数的自然对数(底为e)。
math.max(x,y)     返回 x 和 y 中的最高值。
math.min(x,y)     返回 x 和 y 中的最低值。
math.pow(x,y)     返回 x 的 y 次幂。
math.random()     返回 0 ~ 1 之间的随机数。
math.round(x)     把数四舍五入为最接近的整数。
math.sin(x)     返回数的正弦。
math.sqrt(x)     返回数的平方根。
math.tan(x)     返回角的正切。
math.toSource()     返回该对象的源代码。
math.valueOf()     返回 Math 对象的原始值。

math方法集合

原文:http://www.cnblogs.com/xiaodonger/p/5073293.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!