Function Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Server 1.0.0, Client 1.0.0

bool inPoly(Vec2 testPoint, Vec2 polygonPoint1, Vec2 polygonPoint2, Vec2 polygonPoint3, [ ... ])

The inPoly function is used to test whether a 2D point is in a polygon made up of multiple 2D points.

Parameters

1) Vec2 testPoint The point to test.
2) Vec2 polygonPoint1 The polygon's first point.
3) Vec2 polygonPoint2 The polygon's second point.
4) Vec2 polygonPoint3 The polygon's third point.
5) ... polygonOtherPoints Optional, defaults to null. The polygon's other points(s).

Return

bool A bool representing whether the point is inside the polygon.

Notes

There aren't any notes for this function.

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.