summaryrefslogtreecommitdiff
path: root/math.lua
diff options
context:
space:
mode:
Diffstat (limited to 'math.lua')
-rw-r--r--math.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/math.lua b/math.lua
index b543fa0..4a13517 100644
--- a/math.lua
+++ b/math.lua
@@ -4,7 +4,7 @@ Vec2.__add = function(a, b) return vec2(a.x + b.x, a.y + b.y) end
Vec2.__unm = function(a) return vec2(-a.x, -a.y) end
Vec2.__sub = function(a, b) return a + (-b) end
Vec2.__mul = function(a, b)
- if (type(b) == "number") then return vec2(a.x * b, a.y * b) end
+ if (type(b) == "number") then return vec2(a.x * b, a.y * b) end -- scalar mult
return a.x * b.x + a.y * b.y
end
Vec2.__div = function(a, b) return vec2(a.x / b.x, a.y / b.y) end