示例#1
0
        [TestCase(2.1, ExpectedResult = 2)] // Top of segment
        public static double IntersectionPointY_Horizontal(double xPtN)
        {
            IPathSegment segment = new LineSegment(
                new CartesianCoordinate(2, 2),
                new CartesianCoordinate(3, 2));

            return(PointProjection.IntersectionPointY(xPtN, segment));
        }
示例#2
0
        public static void IntersectionPointY_Vertical_Returns_Infinity()
        {
            IPathSegment segment = new LineSegment(
                new CartesianCoordinate(2, 2),
                new CartesianCoordinate(2, 4));

            Assert.IsTrue(double.IsInfinity(PointProjection.IntersectionPointY(2, segment)));
        }