From 96dd53c9ea8fe124a699de3b04069102a6002128 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 20 Jun 2024 14:42:25 +0200 Subject: client-side collision --- test-client/util.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'test-client/util.ts') diff --git a/test-client/util.ts b/test-client/util.ts index 23679974..1c431411 100644 --- a/test-client/util.ts +++ b/test-client/util.ts @@ -21,6 +21,7 @@ export function add_v2(p: V2, o: V2 | number) { if (typeof o == "number") return { x: p.x + o, y: p.y + o } else return { x: p.x + o.x, y: p.y + o.y } } +export function sub_v2(p: V2, o: V2) { return { x: p.x - o.x, y: p.y - o.y } } export function aabb_circle_distance( min_x: number, -- cgit v1.2.3-70-g09d2