LUA常用的封装函数(汇总)
LUA常用的封装函数封装四舍五入封装角度封装读取文件封装分割字符串
封装四舍五入
function getDecimalInteger(data)
data = tonumber(data)
local a,b=math.modf(data) --a整数,小数
local c =0;
if b<=0.5 then
c = math.floor(data)
else
c = math.ceil(data)
end
return c
end
封装角度
function get
原创
2021-04-15 17:14:40 ·
603 阅读 ·
0 评论