Method Contains
Contains(Vector2)
Tests whether a point lies inside the polygon or on one of its vertices or edges.
public bool Contains(Vector2 p)
Parameters
pVector2The point to test.
Returns
Remarks
The method uses a horizontal ray cast from just left of the polygon's minimum X bound and counts segment intersections. Exact vertex matches are treated as contained immediately.