コード例 #1
0
        public void PolygonByArea()
        {
            var polygon = Shaper.PolygonByArea(9.0, 1.0, new Vector3(10.0, 10.0));

            Assert.Equal(9.0, polygon.Area);
            Assert.Contains(polygon.Vertices, p => p.X == 10.0 && p.Y == 10.0);
            Assert.Contains(polygon.Vertices, p => p.X == 13.0 && p.Y == 13.0);
            Assert.Contains(polygon.Vertices, p => p.X == 10.0 && p.Y == 13.0);
            Assert.Contains(polygon.Vertices, p => p.X == 13.0 && p.Y == 13.0);
        }