[TestCase(2.1, ExpectedResult = 2)] // Right of segment public static double IntersectionPointX_Vertical(double yPtN) { IPathSegment segment = new LineSegment( new CartesianCoordinate(2, 2), new CartesianCoordinate(2, 3)); return(PointProjection.IntersectionPointX(yPtN, segment)); }
public static void IntersectionPointX_Horizontal_Returns_Infinity() { IPathSegment segment = new LineSegment( new CartesianCoordinate(2, 2), new CartesianCoordinate(4, 2)); Assert.IsTrue(double.IsInfinity(PointProjection.IntersectionPointX(2, segment))); }