[modified] vec2 to support direct use for conversion in functional.map

This commit is contained in:
Max Cahill 2021-04-15 10:22:26 +10:00
parent d476bc9c9c
commit d1b7e77b8a

View File

@ -16,7 +16,7 @@ end
--probably-too-flexible ctor --probably-too-flexible ctor
function vec2:new(x, y) function vec2:new(x, y)
if x and y then if type(x) == "number" and type(y) == "number" then
return vec2:xy(x,y) return vec2:xy(x,y)
elseif x then elseif x then
if type(x) == "number" then if type(x) == "number" then