function round(n) local m=n-mod(n,1) if mod(n,1)>=0.5 then m=m+1; end return m; end function ceil(n) local m=n-mod(n,1)+1 return m; end