Exemplo n.º 1
0
        public void VectorMath_CheckIf2LinesIntersect_AngleTolerance()
        {
            Point A1     = new Point(2, 14);
            Point A2     = new Point(4, 14);
            Point B1     = new Point(4, 13);
            Point B2     = new Point(2, 16);
            bool  result = VectorMath.CheckIf2LinesIntersect(A1, A2, B1, B2);

            Assert.IsTrue(result);
        }
Exemplo n.º 2
0
        public void VectorMath_CheckIf2LinesIntersect_CrossingInMiddle()
        {
            Point A1     = new Point(1, 1);
            Point A2     = new Point(3, 3);
            Point B1     = new Point(3, 1);
            Point B2     = new Point(1, 3);
            bool  result = VectorMath.CheckIf2LinesIntersect(A1, A2, B1, B2);

            Assert.IsTrue(result);
        }
Exemplo n.º 3
0
        public void VectorMath_CheckIf2LinesIntersect_Nointersection()
        {
            Point A1     = new Point(1, 1);
            Point A2     = new Point(10, 10);
            Point B1     = new Point(10, 1);
            Point B2     = new Point(5, 4);
            bool  result = VectorMath.CheckIf2LinesIntersect(A1, A2, B1, B2);

            Assert.IsFalse(result);
        }
Exemplo n.º 4
0
        public void VectorMath_CheckIf2LinesIntersect_01()
        {
            Point A1     = new Point(1, 1);
            Point A2     = new Point(2, 2);
            Point B1     = new Point(2, 2);
            Point B2     = new Point(3, 4);
            bool  result = VectorMath.CheckIf2LinesIntersect(A1, A2, B1, B2);

            Assert.IsTrue(result);
        }