math
math
math 包
- math.e 自然常数e
- math.pi 圆周率
- math.ceil(x) x向上取整数
- math.pow(x, y) 指数运算,得到x的y次方
- math.log(x) 对数计算,默认基地为e。
-
math.sqrt(x) 平方根
-
三角函数
- math.sin(x)
- math.cos(x)
- math.tan(x)
- math.asin(x)
- math.acos(x)
-
math.atan(x)
-
角度与弧度互换
- math.degrees(x)
-
math.radians(x)
-
双曲函数
- math.sinh(x)
- math.cosh(x)
- math.tanh(x)
- math.asinh(x)
- math.acosh(x)
-
math.atanh(x)
-
特殊函数
- math.erf(x)
- math.gamma(x)