コード例 #1
0
        public void GetIntersectionPointsLine_VerticalLine_A()
        {
            //assign
            Geometry.MarginOfError = 0.01;
            WCircle a = new WCircle(new WPoint(53.8075, 29.1875), 4.6825) / Utilities.UNITS_TO_PIXELS;
            WLine   b = new WLine(new WPoint(51.27, 25), new WPoint(51.27, 19.125)) / Utilities.UNITS_TO_PIXELS;

            //account
            Utilities.SaveDiagram(new IDraw[] { a, b.ToLineSegment() }, nameof(TestCircle));
            //act
            WPoint[] result = a.GetIntersectionPoints(b);
            //assert
            Assert.AreEqual(2, result.Length);
        }