dotfiles/.config/awesome/util.lua

18 lines
254 B
Lua
Raw Normal View History

2020-11-22 12:04:55 +01:00
local Util = {}
function Util.round(x)
if x%2 ~= 0.5 then
return math.floor(x+0.5)
end
return x-0.5
end
function table.copy(t)
local u = { }
for k, v in pairs(t) do u[k] = v end
return setmetatable(u, getmetatable(t))
end
return Util