diff --git a/vec2.lua b/vec2.lua index 31657ac..7769742 100644 --- a/vec2.lua +++ b/vec2.lua @@ -16,7 +16,7 @@ end --probably-too-flexible ctor function vec2:new(x, y) - if x and y then + if type(x) == "number" and type(y) == "number" then return vec2:xy(x,y) elseif x then if type(x) == "number" then