LUA常用的封装函数 封装四舍五入 封装角度 封装读取文件 封装分割字符串 封装table中添加key,value 封装四舍五入 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 getAngleByPos(p1,p2)</