Ejemplo n.º 1
0
        public void AreaCalculationTest2()
        {
            // Test a badly-formed polyline (with duplicate points):
            var pline = new PolyLine(
                new Vector(0, 0),
                new Vector(0, 2),
                new Vector(0, 2),
                new Vector(2, 0),
                new Vector(0, 0));

            pline.Close();

            double area = pline.CalculateEnclosedArea();

            Assert.AreEqual(2.0, area);
        }