diff options
Diffstat (limited to 'test-client/util.ts')
-rw-r--r-- | test-client/util.ts | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/test-client/util.ts b/test-client/util.ts index 1c431411..975a5700 100644 --- a/test-client/util.ts +++ b/test-client/util.ts @@ -22,16 +22,3 @@ export function add_v2(p: V2, o: V2 | number) { 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, - min_y: number, - max_x: number, - max_y: number, - px: number, - py: number -): number { - const dx = px - Math.max(min_x, Math.min(max_x, px)) - const dy = py - Math.max(min_y, Math.min(max_y, py)) - return Math.sqrt(dx * dx + dy * dy) -} |