diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-06-21 12:39:50 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:26:47 +0200 | 
| commit | 1ab1fd8cc03678ac180673884eff098821bcecd2 (patch) | |
| tree | fc4d4668628dd4cd45b7d57c4efe74fec135ecba /test-client/util.ts | |
| parent | 607b3509f6bfd7d8ca39b12d01a6428689bb3ded (diff) | |
| download | hurrycurry-1ab1fd8cc03678ac180673884eff098821bcecd2.tar hurrycurry-1ab1fd8cc03678ac180673884eff098821bcecd2.tar.bz2 hurrycurry-1ab1fd8cc03678ac180673884eff098821bcecd2.tar.zst | |
refactor movement
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) -} | 
