WeakAuras.Mixin

This commit is contained in:
Bunny67
2020-09-06 11:33:12 +03:00
parent e9957582cb
commit 47e81f3d70
10 changed files with 48 additions and 30 deletions
-16
View File
@@ -1,6 +1,5 @@
local ipairs = ipairs
local pairs = pairs
local select = select
local ceil, floor = math.ceil, math.floor
local format = string.format
@@ -27,21 +26,6 @@ function tInvert(tbl)
return inverted;
end
local function Mixin(object, ...)
for i = 1, select("#", ...) do
local mixin = select(i, ...);
for k, v in pairs(mixin) do
object[k] = v;
end
end
return object;
end
function CreateFromMixins(...)
return Mixin({}, ...)
end
function Round(value)
if value < 0 then
return ceil(value - .5);