---
title: intersectPolygonPolygon
status: published
category: primitives
group: Function
author: api
date: 06/23/2023
order: 45
---<Small>Public Function</Small>

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


##### Parameters


<ParametersTable>

<ParametersTableRow>
<ParametersTableName>

`polygonA`

</ParametersTableName>
<ParametersTableDescription>

```ts
VecLike[]
```

An array of points representing the first polygon.




</ParametersTableDescription>
</ParametersTableRow>
<ParametersTableRow>
<ParametersTableName>

`polygonB`

</ParametersTableName>
<ParametersTableDescription>

```ts
VecLike[]
```

An array of points representing the second polygon.




</ParametersTableDescription>
</ParametersTableRow>
</ParametersTable>

##### Returns


```ts
null | VecLike[]
```

##### References

[VecLike](/gen/primitives/VecLike-type)

