コード例 #1
0
        public void RotatePolygon(string points, double angle, string expectedPolygon)
        {
            var   testElement = new Polygon2D(from x in points.Split(';') select Point2D.Parse(x));
            var   expected    = new Polygon2D(from x in expectedPolygon.Split(';') select Point2D.Parse(x));
            Angle a           = Angle.FromRadians(angle);
            var   result      = testElement.Rotate(a);

            Assert.IsTrue(expected.Equals(result, 0.001));
        }