mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-29 16:24:35 +00:00
[modified] vec2
to support direct use for conversion in functional.map
This commit is contained in:
parent
d476bc9c9c
commit
d1b7e77b8a
2
vec2.lua
2
vec2.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user