aboutsummaryrefslogtreecommitdiff
path: root/src/utils.lua
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-03-12 14:50:17 -0400
committeriamcheeseman <[email protected]>2026-03-12 14:50:17 -0400
commit4828c80a92a40067d8f58922c38c4dbeeafc8403 (patch)
treeb531e615fb767a2aa7212e5b8e8cd3ebea441e5c /src/utils.lua
parent8b9f468ffaa169788d1488d2640d2e0e49bb50f3 (diff)
debug gooey :)
Diffstat (limited to 'src/utils.lua')
-rw-r--r--src/utils.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/utils.lua b/src/utils.lua
index 29c3024..33ca7e8 100644
--- a/src/utils.lua
+++ b/src/utils.lua
@@ -18,6 +18,12 @@ function min(a, b)
return b
end
+function pop(tbl)
+ local last = tbl[#tbl]
+ tbl[#tbl] = nil
+ return last
+end
+
function normalize(x, y)
if x == 0 and y == 0 then
return 0, 0
@@ -38,11 +44,7 @@ function dist(x1, y1, x2, y2)
return (dx*dx + dy*dy)^0.5
end
-mathx = {}
-
-mathx.tau = math.pi * 2
-
-function mathx.sign(x)
+function sign(x)
if x == 0 then
return 0
end