summaryrefslogtreecommitdiff
path: root/test-client/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test-client/util.ts')
-rw-r--r--test-client/util.ts1
1 files changed, 1 insertions, 0 deletions
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,