mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 15:23:48 +01:00
Add vector.zeros
This commit is contained in:
parent
9bbbcae162
commit
71b6d9769d
@ -36,6 +36,13 @@ function new(v)
|
||||
return setmetatable(v, metatable)
|
||||
end
|
||||
|
||||
function zeros(n)
|
||||
local v = {}
|
||||
for i = 1, n do
|
||||
v[i] = 0
|
||||
end
|
||||
return new(v)
|
||||
end
|
||||
function from_xyzw(v)
|
||||
return new{v.x, v.y, v.z, v.w}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user