public void PointInPoly_Crossing_Fail()
        {
            Polygon p = Polygon.CreateRegularNSidedPolygon(new Vector2(0.0f, 0.0f), 4, 10.0f);
            Vector2 v = new Vector2(15.0f, 15.0f);

            var result = PolygonIntersection.IsPointInPolygon(v, p, true, false);

            Assert.False(result);
        }
        public void PointInPoly_OnEdge_False()
        {
            Polygon p = Polygon.CreateRegularNSidedPolygon(new Vector2(0.0f, 0.0f), 4, 10.0f);
            Vector2 v = new Vector2(10.0f, 0.0f);

            var result = PolygonIntersection.IsPointInPolygon(v, p, false, false);

            Assert.False(result);
        }
        public void PointInPoly_Winding_Pass()
        {
            Polygon p = Polygon.CreateRegularNSidedPolygon(new Vector2(0.0f, 0.0f), 5, 10.0f);
            Vector2 v = new Vector2(5.0f, 5.0f);

            var result = PolygonIntersection.IsPointInPolygon(v, p, true, true);

            Assert.True(result);
        }