mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-19 21:04:13 +02: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
|
metatable.__le = less_or_equal
|
||||||
|
|
||||||
function combine(v1, v2, f)
|
function combine(v, other_v, f)
|
||||||
local new_vector = {}
|
local new_vector = {}
|
||||||
for key, value in pairs(v1) do
|
for key, value in pairs(v) do
|
||||||
new_vector[key] = f(value, v2[key])
|
new_vector[key] = f(value, other_v[key])
|
||||||
end
|
end
|
||||||
return new(new_vector)
|
return new(new_vector)
|
||||||
end
|
end
|
||||||
@ -90,8 +90,8 @@ function apply(v, f, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function combinator(f)
|
function combinator(f)
|
||||||
return function(v1, v2)
|
return function(v, other_v)
|
||||||
return combine(v1, v2, f)
|
return combine(v, other_v, f)
|
||||||
end, function(v, ...)
|
end, function(v, ...)
|
||||||
return apply(v, f, ...)
|
return apply(v, f, ...)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user