mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +01:00
Fix vector.invert
This commit is contained in:
parent
228bfda006
commit
9bbbcae162
@ -105,9 +105,11 @@ function combinator(f)
|
||||
end
|
||||
|
||||
function invert(v)
|
||||
local res = {}
|
||||
for key, value in pairs(v) do
|
||||
v[key] = -value
|
||||
res[key] = -value
|
||||
end
|
||||
return new(res)
|
||||
end
|
||||
|
||||
add, add_scalar = combinator(function(v, w) return v + w end)
|
||||
|
Loading…
Reference in New Issue
Block a user