##### Parameters

`Point2D[]`

vertices

A list of vertices.

**Type** Polygon2D

**Namespace** MathNet.Spatial.Euclidean

**Interfaces** IEnumerable<Point2D>, IEquatable<Polygon2D>

Class to represent a closed polygon.

- EnclosesPoint
- Equals
- Equals
- Equals
- GetEnumerator
- GetHashCode
- GetType
- ReduceComplexity
- Rotate
- RotateAround
- ToPolyLine2D
- ToString
- TranslateBy

Initializes a new instance of the Polygon2D class.
At least three points are needed to construct a polygon. If less are passed an ArgumentException is thrown.
##### Parameters

`Point2D[]`

verticesA list of vertices.

Initializes a new instance of the Polygon2D class.
At least three points are needed to construct a polygon. If less are passed an ArgumentException is thrown.
##### Parameters

`IEnumerable<Point2D>`

verticesA list of vertices.

Compute whether or not two polygons are colliding based on whether or not the vertices of
either are enclosed within the shape of the other. This is a simple means of detecting collisions
that can fail if the two polygons are heavily overlapped in such a way that one protrudes through
the other and out its opposing side without any vertices being enclosed.
##### Return

`bool`

True if the vertices collide; otherwise false.

Using algorithm from Ouellet - https://www.codeproject.com/Articles/1210225/Fast-and-improved-D-Convex-Hull-algorithm-and-its, take an IEnumerable of Point2Ds and computes the
two dimensional convex hull, returning it as a Polygon2D object.
##### Parameters

`IEnumerable<Point2D>`

pointListA list of points

`bool`

clockWiseIn which direction to return the points on the convex hull. If true, clockwise. Otherwise counter clockwise

Determine whether or not a point is inside a polygon using the intersection counting
method. Return true if the point is contained, false if it is not. Points which lie
on the edge are not counted as inside the polygon.
**Obsolete:** Use instance method EnclosesPoint instead, obsolete since 6/12/2017
##### Return

`bool`

True if the point is inside the polygon; otherwise false.

Test whether a point is enclosed within a polygon. Points on the polygon edges are not
counted as contained within the polygon.
##### Return

`bool`

True if the point is inside the polygon; otherwise false.

Returns a value to indicate if a pair of polygons are equal
##### Parameters

##### Return

`Polygon2D`

otherThe polygon to compare against.

`double`

toleranceA tolerance (epsilon) to adjust for floating point error

`bool`

true if the polygons are equal; otherwise false

Returns an enumerator for the vertices
**Obsolete:** Use Vertices instead, obsolete since 6/12/2017
##### Return

`IEnumerator<Point2D>`

An enumerator for the vertices

Creates a new polygon from the existing polygon by removing any edges whose adjacent segments are considered colinear within the provided tolerance
##### Parameters

`double`

singleStepToleranceThe tolerance by which adjacent edges should be considered collinear.

Converts the polygon into a PolyLine2D

Gets the number of vertices in the polygon.
**Obsolete:** Use VertexCount instead, obsolete since 6/12/2017

Gets a list of Edges

A index into the list of vertices
**Obsolete:** Use Vertices instead, obsolete since 6/12/2017

Gets the number of vertices in the polygon.

Gets a list of vertices