Permalink
Browse files

Include add/sub again

  • Loading branch information...
1 parent ca7977d commit 78308d9aab13d12f34f8ae328773da9f6560295a @vrld committed Apr 12, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 vector-light.lua
View
@@ -38,6 +38,14 @@ local function div(s, x,y)
return x/s, y/s
end
+local function add(x1,y1, x2,y2)
+ return x1+x2, y1+y2
+end
+
+local function sub(x1,y1, x2,y2)
+ return x1-x2, y1-y2
+end
+
local function permul(x1,y1, x2,y2)
return x1*x2, y1*y2
end
@@ -106,6 +114,8 @@ return {
-- arithmetic
mul = mul,
div = div,
+ add = add,
+ sub = sub,
permul = permul,
dot = dot,
det = det,

0 comments on commit 78308d9

Please sign in to comment.