@mocanvas/editor · function
declare function intersectPolygonPolygon(polygonA: VecLike[], polygonB: VecLike[]): null | VecLike[]The convex region common to two convex polygons, or null when they do not overlap. Clipped one edge at a time (Sutherland–Hodgman), so a concave input gives a convex answer — which is the same caveat the name carries.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.