lua的math内置库

Reading Time:The full text has 114 words, estimated reading time: 1 minutes
Creation Date:2022-04-14
Article Tags:
Previous Article:NeoVim-安装
Next Article:lua的table内置库
 
BEGIN

math内置库用于数学计算,有如下常用方法:

方法名作用
abs绝对值
acos反余弦
asin反正弦
atan反正切
cos余弦
sin正弦
tan正切
ceil向上取整
floor向下取整
sqrt平方根
deg弧度转角度
rad角度转弧度
huge无限大
max最大值
min最小值
modf返回整数和小数
pi常数PI
random随机数
randomseed随机数基数
type返回类型,integer或float
FINISH
Previous Article:NeoVim-安装
Next Article:lua的table内置库

Random Articles
Life Countdown
default