diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-20 14:42:25 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:24:14 +0200 |
commit | 96dd53c9ea8fe124a699de3b04069102a6002128 (patch) | |
tree | ba978eae3518dd8f60e061d2c40f5e4478f987da /test-client/util.ts | |
parent | d888bd25908ff26712232f1b296f902d37d93d40 (diff) | |
download | hurrycurry-96dd53c9ea8fe124a699de3b04069102a6002128.tar hurrycurry-96dd53c9ea8fe124a699de3b04069102a6002128.tar.bz2 hurrycurry-96dd53c9ea8fe124a699de3b04069102a6002128.tar.zst |
client-side collision
Diffstat (limited to 'test-client/util.ts')
-rw-r--r-- | test-client/util.ts | 1 |
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, |