diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-04-29 19:26:18 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-04-29 19:26:18 -0700 |
| commit | 48491750e4ece19d2252592850b75d100afc2455 (patch) | |
| tree | 54a1edb6f390053c0ecee47da7e6121a9a387839 /math.lua | |
| parent | 42aeb43e2c8a959f5ea1f9a33cfe63d667321c56 (diff) | |
| download | dyl8-48491750e4ece19d2252592850b75d100afc2455.tar.gz dyl8-48491750e4ece19d2252592850b75d100afc2455.zip | |
The refactor from HELL
Diffstat (limited to 'math.lua')
| -rw-r--r-- | math.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |
