brief(er) vector factory

This commit is contained in:
Matthias Richter 2012-06-12 12:58:33 +02:00
parent f78bfa3ca8
commit 7f92f2c4f1

View File

@ -31,9 +31,7 @@ local vector = {}
vector.__index = vector vector.__index = vector
local function new(x,y) local function new(x,y)
local v = {x = x or 0, y = y or 0} return setmetatable({x = x or 0, y = y or 0}, vector)
setmetatable(v, vector)
return v
end end
local function isvector(v) local function isvector(v)