functiongetDecimalInteger(data)
data =tonumber(data)local a,b=math.modf(data)--a整数,小数local c =0;if b<=0.5then
c = math.floor(data)else
c = math.ceil(data)endreturn c
end
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 cend封装角度function get