public void FindIntersectionsOrderIsMaintained4() { var p = this.createInverseTriangleOrder3(); var intersection = FillCalculator.FindIntersections(-0.1, p); var first = intersection[0]; var second = intersection[1]; Assert.IsTrue(first.X <= second.X); }
public void FindUpperPointIntersectionTest() { Point p1, p2; CreateLinePoints(out p1, out p2); var intersection = FillCalculator.FindIntersection(p1, p2, 4); Assert.IsNotNull(intersection); }
public void FindInvalidPointIntersectionReturnsNullTest([Values(-5, 5, double.PositiveInfinity, double.NegativeInfinity, double.NaN)] double d) { Point p1, p2; CreateLinePoints(out p1, out p2); var intersection = FillCalculator.FindIntersection(p1, p2, d); Assert.IsNull(intersection); }
public void FindValidIntersectionTest() { Point p1, p2; CreateLinePoints(out p1, out p2); var intersection = FillCalculator.FindIntersection(p1, p2, 0); Assert.AreEqual(0, intersection.Y); Assert.AreEqual(2, intersection.X); }