mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-25 16:53:46 +01:00
vector: get rid of lexical comparisons
This commit is contained in:
parent
c50410a81e
commit
c14c208a61
18
vector.lua
18
vector.lua
@ -70,24 +70,6 @@ end
|
||||
|
||||
metatable.__eq = equals
|
||||
|
||||
function less_than(v, w)
|
||||
for k, v in pairs(v) do
|
||||
if v >= w[k] then return false end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
metatable.__lt = less_than
|
||||
|
||||
function less_or_equal(v, w)
|
||||
for k, v in pairs(v) do
|
||||
if v > w[k] then return false end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
metatable.__le = less_or_equal
|
||||
|
||||
function combine(v, w, f)
|
||||
local new_vector = {}
|
||||
for key, value in pairs(v) do
|
||||
|
Loading…
Reference in New Issue
Block a user