mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Now returns true if `v' is a table and both `v.x' and `v.y' are numbers.
This commit is contained in:
parent
bd10ec4caf
commit
e8af2a6ec2
@ -36,7 +36,7 @@ end
|
||||
local zero = new(0,0)
|
||||
|
||||
local function isvector(v)
|
||||
return getmetatable(v) == vector
|
||||
return type(v) == 'table' and type(v.x) == 'number' and type(v.y) == 'number'
|
||||
end
|
||||
|
||||
function vector:clone()
|
||||
|
Loading…
Reference in New Issue
Block a user