@mocanvas/editor · function

polygonsIntersect

declare function polygonsIntersect(a: VecLike[], b: VecLike[]): boolean

Whether two closed polygons overlap at all — including the case where one is entirely inside the other, which no edge crossing would reveal.

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.