Skip to content

Instantly share code, notes, and snippets.

Johannes Gijsbers johannesgijsbers

  • Motekforce Link
  • Amsterdam
Block or report user

Report or block johannesgijsbers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@johannesgijsbers
johannesgijsbers / Vector.lua
Last active Aug 29, 2015 — forked from mebens/Vector.lua
Forked version, as subtraction and division order with scalars were not correct
View Vector.lua
Vector = {}
Vector.__index = Vector
function Vector.__add(a, b)
if type(a) == "number" then
return Vector.new(b.x + a, b.y + a)
elseif type(b) == "number" then
return Vector.new(a.x + b, a.y + b)
else
return Vector.new(a.x + b.x, a.y + b.y)
You can’t perform that action at this time.