summaryrefslogtreecommitdiff
path: root/math.lua
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2026-04-22 20:29:50 -0700
committerElizabeth Hunt <elizabeth@simponic.xyz>2026-04-22 20:29:50 -0700
commit24b0469237285a05d9ffc05d18e43cc5dcdef00f (patch)
tree1c6924614b7d030c467919380d6c398d62efb602 /math.lua
parent078eca583eec21d317e931c84db8f084bef4305d (diff)
downloaddyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.tar.gz
dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.zip
Stuff
Diffstat (limited to 'math.lua')
-rw-r--r--math.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/math.lua b/math.lua
index f745dc8..b543fa0 100644
--- a/math.lua
+++ b/math.lua
@@ -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