intersectPolygonPolygon

See source code

Create a new convex polygon as the intersection of two convex polygons.

function intersectPolygonPolygon(
  polygonA: VecLike[],
  polygonB: VecLike[]
): null | VecLike[]

Parameters

NameDescription

polygonA

An array of points representing the first polygon.

polygonB

An array of points representing the second polygon.

Returns

null | VecLike[]
Prev
intersectPolygonBounds
Next
isSafeFloat