@classmethod
def line_intersection(cls, line0, line1):
    """ Returns True if line0 intersects line1, else False.
        Returns -1 if line0 and line1 are collinear and intersect.

        cls.test_intersection(np.arr[float(x4)], np.arr[float(x4)]) -> int

        """
    p0, q0 = line0.reshape((2, 2))
    p1, q1 = line1.reshape((2, 2))
    ori_0p1 = cls.cross_orientation(p0, q0, p1)
    ori_0q1 = cls.cross_orientation(p0, q0, q1)
    ori_1p0 = cls.cross_orientation(p1, q1, p0)
    ori_1q0 = cls.cross_orientation(p1, q1, q0)
    if ori_0p1 == ori_0q1 == 0 or ori_1p0 == ori_1q0 == 0:
        return -1
    return ori_0p1 != ori_0q1 and ori_1p0 != ori_1q0
