Esempio n. 1
0
        public void AxisQuad()
        {
            var polygon =
                new Polygon
                (
                    new[]
            {
                new Vector3(3.0, 1.0),
                new Vector3(6.0, 1.0),
                new Vector3(1.0, 6.0),
                new Vector3(1.0, 3.0)
            }
                );
            var axis  = Shaper.AxisQuad(polygon);
            var start = new Vector3(2.0, 2.0);
            var end   = new Vector3(3.5, 3.5);

            Assert.Equal(axis.Start.X, start.X);
            Assert.Equal(axis.Start.Y, start.Y);
            Assert.Equal(axis.End.X, end.X);
            Assert.Equal(axis.End.Y, end.Y);
        }