Accord.Tests.Math.LineTest.GetIntersectionPointTest C# (CSharp) Method

GetIntersectionPointTest() private method

private GetIntersectionPointTest ( float sx1, float sy1, float ex1, float ey1, float sx2, float sy2, float ex2, float ey2, float xRet, float yRet, bool hasResult ) : void
sx1 float
sy1 float
ex1 float
ey1 float
sx2 float
sy2 float
ex2 float
ey2 float
xRet float
yRet float
hasResult bool
return void
        public void GetIntersectionPointTest(float sx1, float sy1, float ex1, float ey1,
            float sx2, float sy2, float ex2, float ey2, float xRet, float yRet, bool hasResult)
        {
            Line line1 = Line.FromPoints(new Point(sx1, sy1), new Point(ex1, ey1));
            Line line2 = Line.FromPoints(new Point(sx2, sy2), new Point(ex2, ey2));

            Point? result = line1.GetIntersectionWith(line2);

            if (hasResult)
            {
                Assert.IsTrue(result == new Point(xRet, yRet));
            }
            else
            {
                Assert.AreEqual(null, result);
            }
        }