diff options
| author | Elizabeth Hunt <elizabeth@simponic.xyz> | 2026-04-22 20:29:50 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth@simponic.xyz> | 2026-04-22 20:29:50 -0700 |
| commit | 24b0469237285a05d9ffc05d18e43cc5dcdef00f (patch) | |
| tree | 1c6924614b7d030c467919380d6c398d62efb602 /math.lua | |
| parent | 078eca583eec21d317e931c84db8f084bef4305d (diff) | |
| download | dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.tar.gz dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.zip | |
Stuff
Diffstat (limited to 'math.lua')
| -rw-r--r-- | math.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8,7 +8,7 @@ Vec2.__mul = function(a, b) 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 -Vec2.__tostring = function(a) return "(" .. a.x .. "," .. a.y .. ")" end +Vec2.__tostring = function(a) return "(" .. fmt(a.x) .. "," .. fmt(a.y) .. ")" end function Vec2:magnitude() return sqrt(self.x * self.x + self.y * self.y) @@ -33,4 +33,4 @@ function normalize_scalar(x) if x == 0 then return 0 end if x < 0 then return -1 end return 1 -end
\ No newline at end of file +end |
