コード例 #1
0
        public void TriangleMissingIntersectionsDownCenter()
        {
            var poly = new RegularPolygon(50, 50, 3, 30);

            PointF[] points = poly.FindIntersections(new PointF(0, 50), new PointF(100, 50)).ToArray();

            Assert.Equal(2, points.Length);
        }
コード例 #2
0
        public void ClippingCornerShouldReturn2Points()
        {
            var poly = new RegularPolygon(50, 50, 7, 30, -(float)Math.PI);

            PointF[] points = poly.FindIntersections(new PointF(0, 20), new PointF(100, 20)).ToArray();

            Assert.Equal(2, points.Length);
        }