Vector2.lua 322 B

1234567891011121314151617181920212223
  1. require "Polycode/Vector3"
  2. class "Vector2" (Vector3)
  3. function Vector2:Vector2(...)
  4. for k,v in pairs(arg) do
  5. if type(v) == "table" then
  6. if v.__ptr ~= nil then
  7. arg[k] = v.__ptr
  8. end
  9. end
  10. end
  11. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  12. self.__ptr = Polycore.Vector2(unpack(arg))
  13. end
  14. end