local Vector = require "libs.hump.vector"
local Vec2 = require "libs.something_else.third_party.hump.vector"
local vertex1 = Vector(50, 50)
local vertex2 = Vec2(100, 100)
local sum = vertex1 + vertex2 -- crash!
I am using a library that has an internal instance of Vector, and I am needing to do some math with a local copy of Vector. The problem is, when isvector checks if they are both vectors (they are!), it decides that they aren't due to them coming from different instances of Vector.
Perhaps a fix for this would be to check the data structure's integrity instead of a pointer to the Vector library?
I am using a library that has an internal instance of Vector, and I am needing to do some math with a local copy of Vector. The problem is, when isvector checks if they are both vectors (they are!), it decides that they aren't due to them coming from different instances of Vector.
Perhaps a fix for this would be to check the data structure's integrity instead of a pointer to the Vector library?