public bool PointIsBelowSegmentIntersection_Outside_Segment(double yPtN, double yIntersection) { Point vertexI = new Point(1, -1); Point vertexJ = new Point(2, 1); return(ProjectionVertical.PointIsBelowSegmentIntersection(yPtN, yIntersection, vertexI, vertexJ)); }
[TestCase(2.1, ExpectedResult = 2)] // Top of segment public double IntersectionPointY_Horizontal(double xPtN) { Point ptI = new Point(2, 2); Point ptJ = new Point(3, 2); return(ProjectionVertical.IntersectionPointY(xPtN, ptI, ptJ)); }
[TestCase(3.5, ExpectedResult = 5)] // Top of segment public double IntersectionPointY_Sloped(double xPtN) { Point ptI = new Point(2, 2); Point ptJ = new Point(3, 4); return(ProjectionVertical.IntersectionPointY(xPtN, ptI, ptJ)); }
public bool PointIsBelowSegmentBottom_Sloped_Segment(double yPtN, double yBottomEnd, double yTopEnd) { Point ptI = new Point(10, yBottomEnd); Point ptJ = new Point(20, yTopEnd); return(ProjectionVertical.PointIsBelowSegmentBottom(yPtN, ptI, ptJ)); }
public bool PointIsWithinSegmentWidth_Sloped(double xPtN, double xLeftEnd, double xRightEnd) { Point ptI = new Point(xLeftEnd, 1); Point ptJ = new Point(xRightEnd, 15); return(ProjectionVertical.PointIsWithinSegmentWidth(xPtN, ptI, ptJ)); }
public void NumberOfIntersections_Of_Polyline_Throws_Argument_Exception() { Point coordinate = new Point(1, 1); Assert.That(() => ProjectionVertical.NumberOfIntersections(coordinate, polyline.ToArray()), Throws.Exception .TypeOf <ArgumentException>()); }
public void IntersectionPointY_Vertical_Throws_Argument_Exception() { Point ptI = new Point(2, 2); Point ptJ = new Point(2, 4); Assert.That(() => ProjectionVertical.IntersectionPointY(2, ptI, ptJ), Throws.Exception .TypeOf <ArgumentException>()); }
public int NumberOfIntersections_Intersection_Multiple_Solid_Void(double y) { Point coordinate = new Point(1, y); return(ProjectionVertical.NumberOfIntersections(coordinate, comb.ToArray())); }
public int NumberOfIntersections_Left_Of_Square(double y) { Point coordinate = new Point(6, y); return(ProjectionVertical.NumberOfIntersections(coordinate, square.ToArray())); }
public int NumberOfIntersections_Between_Left_And_Right_of_Square(double y) { Point coordinate = new Point(1, y); return(ProjectionVertical.NumberOfIntersections(coordinate, square.ToArray())); }