UNPKG

pocket-physics

Version:

Verlet physics extracted from pocket-ces demos

7 lines (6 loc) 185 B
export const overlapCircleCircle = (ax, ay, arad, bx, by, brad) => { const x = bx - ax; const y = by - ay; const rad = arad + brad; return x * x + y * y < rad * rad; };