I've changed the isvector() function inside vector.lua. Instead of checking that v is a table with number values of x and y, it checks if the meta table of v is vector, since any Vector object has vector as a meta table as defined in the new function. This way has a 100% accuracy of checking if it is a Vector object, whereas before any table with an x and y could have passed.
I'm not sure if you have it this way on purpose, due to speed or some other factor; if so, just shoot me down.
I've changed the
isvector()
function inside vector.lua. Instead of checking thatv
is a table with number values ofx
andy
, it checks if the meta table ofv
isvector
, since any Vector object hasvector
as a meta table as defined in thenew
function. This way has a 100% accuracy of checking if it is a Vector object, whereas before any table with an x and y could have passed.I'm not sure if you have it this way on purpose, due to speed or some other factor; if so, just shoot me down.
Have a good day :)