Aura.Channel.World.Position.InPolygon C# (CSharp) Метод

InPolygon() публичный Метод

Returns whether the position is inside the given points.
public InPolygon ( ) : bool
Результат bool
		public bool InPolygon(params Point[] points)
		{
			var result = false;

			for (int i = 0, j = points.Length - 1; i < points.Length; j = i++)
			{
				if (((points[i].Y > this.Y) != (points[j].Y > this.Y)) && (this.X < (points[j].X - points[i].X) * (this.Y - points[i].Y) / (points[j].Y - points[i].Y) + points[i].X))
					result = !result;
			}

			return result;
		}