summaryrefslogtreecommitdiff
path: root/util.lua
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-12-26 02:43:02 -0600
committerthe lemons <citrons@mondecitronne.com>2022-12-26 02:43:57 -0600
commitb7aca18f4c80426f528bc650e1f6bd01437c8a89 (patch)
tree1b2b7a16eff56e57f916754d89e1928ca170abde /util.lua
parentede9af54010eab4eb6ee1b81fe9d6a0333846e88 (diff)
improve collision code
Diffstat (limited to 'util.lua')
-rw-r--r--util.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.lua b/util.lua
index a639ca2..24b4214 100644
--- a/util.lua
+++ b/util.lua
@@ -27,4 +27,8 @@ function M.deepcopy(t)
return dc(t)
end
+function M.rot(a, x, y)
+ return x*math.cos(a) - y*math.sin(a), x*math.sin(a) + y*math.cos(a)
+end
+
return M