mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
brief(er) vector factory
This commit is contained in:
parent
f78bfa3ca8
commit
7f92f2c4f1
@ -31,9 +31,7 @@ local vector = {}
|
||||
vector.__index = vector
|
||||
|
||||
local function new(x,y)
|
||||
local v = {x = x or 0, y = y or 0}
|
||||
setmetatable(v, vector)
|
||||
return v
|
||||
return setmetatable({x = x or 0, y = y or 0}, vector)
|
||||
end
|
||||
|
||||
local function isvector(v)
|
||||
|
Loading…
Reference in New Issue
Block a user