From 4828c80a92a40067d8f58922c38c4dbeeafc8403 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Thu, 12 Mar 2026 14:50:17 -0400 Subject: debug gooey :) --- src/utils.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/utils.lua') 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 -- cgit v1.3-2-g0d8e