Algorithms
1401. Circle and Rectangle Overlapping
Overlap between a circle and an axis-aligned rectangle reduces to one distance check: clamp the center onto the rectangle, then compare squared distance to radius squared — all in integer arithmetic.
Loading…