C#版本
public static bool ContainsPoint(Vector2[] polyPoints, Vector2 p)
{
var j = polyPoints.Length - 1;
var inside = false;
for (int i = 0; i < polyPoints.Length; j = i++)
{
var pi = polyPoints[i];
var pj = polyPoints[j];
if (((pi.y
关注
打赏