最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Lua math 庫

2022-05-19 10:05 作者:Nimanggi  | 我要投稿

函數(shù)名 | 描述 | 示例 | 結(jié)果

----|------|----|----

pi| 圓周率| math.pi| 3.1415926535898

abs| 取絕對值| math.abs(-2012)| 2012

ceil| 向上取整| math.ceil(9.1)| 10

floor| 向下取整| math.floor(9.9)| 9

max| 取參數(shù)最大值| math.max(2,4,6,8)| 8

min| 取參數(shù)最小值| math.min(2,4,6,8)| 2

pow| 計算x的y次冪| math.pow(2,16)| 65536

sqrt| 開平方| math.sqrt(65536)| 256

mod| 取模| math.mod(65535,2)| 1

modf| 取整數(shù)和小數(shù)部分| math.modf(20.12)| 20? ?0.12

randomseed| 設(shè)隨機數(shù)種子| math.randomseed(os.time())|

random| 取隨機數(shù)| math.random(5,90)| 5~90

rad| 角度轉(zhuǎn)弧度| math.rad(180)| 3.1415926535898

deg| 弧度轉(zhuǎn)角度| math.deg(math.pi)| 180

exp| e的x次方| math.exp(4)| 54.598150033144

log| 計算x的自然對數(shù)| math.log(54.598150033144)| 4

log10| 計算10為底,x的對數(shù)| math.log10(1000)| 3

frexp| 將參數(shù)拆成x * (2 ^ y)的形式| math.frexp(160)| 0.625? ? 8

ldexp| 計算x * (2 ^ y)| math.ldexp(0.625,8)| 160

sin| 正弦| math.sin(math.rad(30))| 0.5

cos| 余弦| math.cos(math.rad(60))| 0.5

tan| 正切| math.tan(math.rad(45))| 1

asin| 反正弦| math.deg(math.asin(0.5))| 30

acos| 反余弦| math.deg(math.acos(0.5))| 60

atan| 反正切| math.deg(math.atan(1))| 45

函數(shù)名| 描述| 示例| 結(jié)果

pi| 圓周率| math.pi| 3.1415926535898

abs| 取絕對值| math.abs(-2012)| 2012

ceil| 向上取整| math.ceil(9.1)| 10

floor| 向下取整| math.floor(9.9)| 9

max| 取參數(shù)最大值| math.max(2,4,6,8)| 8

min| 取參數(shù)最小值| math.min(2,4,6,8)| 2

pow| 計算x的y次冪| math.pow(2,16)| 65536

sqrt| 開平方| math.sqrt(65536)| 256

mod| 取模| math.mod(65535,2)| 1

modf| 取整數(shù)和小數(shù)部分| math.modf(20.12)| 20? ?0.12

randomseed| 設(shè)隨機數(shù)種子| math.randomseed(os.time())|

random| 取隨機數(shù)| math.random(5,90)| 5~90

rad| 角度轉(zhuǎn)弧度| math.rad(180)| 3.1415926535898

deg| 弧度轉(zhuǎn)角度| math.deg(math.pi)| 180

exp| e的x次方| math.exp(4)| 54.598150033144

log| 計算x的自然對數(shù)| math.log(54.598150033144)| 4

log10| 計算10為底,x的對數(shù)| math.log10(1000)| 3

frexp| 將參數(shù)拆成x * (2 ^ y)的形式| math.frexp(160)| 0.625? ? 8

ldexp| 計算x * (2 ^ y)| math.ldexp(0.625,8)| 160

sin| 正弦| math.sin(math.rad(30))| 0.5

cos| 余弦| math.cos(math.rad(60))| 0.5

tan| 正切| math.tan(math.rad(45))| 1

asin| 反正弦| math.deg(math.asin(0.5))| 30

acos| 反余弦| math.deg(math.acos(0.5))| 60

atan| 反正切| math.deg(math.atan(1))| 45


Lua math 庫的評論 (共 條)

分享到微博請遵守國家法律
宁国市| 尼勒克县| 保山市| 烟台市| 铜山县| 年辖:市辖区| 吉首市| 普陀区| 汪清县| 台湾省| 麦盖提县| 疏附县| 酒泉市| 石泉县| 合阳县| 宾川县| 旺苍县| 巴东县| 宁都县| 青冈县| 曲阳县| 体育| 嘉义县| 泸水县| 虞城县| 和林格尔县| 英超| 百色市| 乐清市| 西和县| 谷城县| 饶阳县| 翁源县| 永年县| 珠海市| 都江堰市| 洞头县| 缙云县| 内江市| 古交市| 阜南县|