mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-25 16:53:46 +01:00
Vector: Param renames for consistency
This commit is contained in:
parent
3df17ae43f
commit
de3f79d5b1
10
vector.lua
10
vector.lua
@ -73,10 +73,10 @@ end
|
||||
|
||||
metatable.__le = less_or_equal
|
||||
|
||||
function combine(v1, v2, f)
|
||||
function combine(v, other_v, f)
|
||||
local new_vector = {}
|
||||
for key, value in pairs(v1) do
|
||||
new_vector[key] = f(value, v2[key])
|
||||
for key, value in pairs(v) do
|
||||
new_vector[key] = f(value, other_v[key])
|
||||
end
|
||||
return new(new_vector)
|
||||
end
|
||||
@ -90,8 +90,8 @@ function apply(v, f, ...)
|
||||
end
|
||||
|
||||
function combinator(f)
|
||||
return function(v1, v2)
|
||||
return combine(v1, v2, f)
|
||||
return function(v, other_v)
|
||||
return combine(v, other_v, f)
|
||||
end, function(v, ...)
|
||||
return apply(v, f, ...)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user