Method PointInPolygon
PointInPolygon(Single, Single, RideVector2[])
Determines whether a given x and y point falls within the bounds of a polygon.
Declaration
public static bool PointInPolygon(float pointx, float pointy, RideVector2[] polygon)
Parameters
Type | Name | Description |
---|---|---|
System.Single | pointx | The x dimension of the point |
System.Single | pointy | The y dimension of the point |
RideVector2[] | polygon | An array of RideVector2 that represents the ordered verticies of a polygon with no crossing edges |
Returns
Type | Description |
---|---|
System.Boolean | True if the given point falls within the bounds of the polygon |