Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void FindUpperPointIntersectionTest()
        {
            Point p1, p2;

            CreateLinePoints(out p1, out p2);
            var intersection = FillCalculator.FindIntersection(p1, p2, 4);

            Assert.IsNotNull(intersection);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }