@staticmethod
    def segment_intersection(v1, v2, v3, v4):
        '''
        Finds the intersection point between segments (1)v1->v2 and (2)v3->v4
        and returns it as a vector object.

        >>> a = (98, 28)
        >>> b = (72, 33)
        >>> c = (10, -5)
        >>> d = (20, 88)
        >>> Vector.segment_intersection(a, b, c, d)
        None

        >>> a = (0, 0)
        >>> b = (10, 10)
        >>> c = (0, 10)
        >>> d = (10, 0)
        >>> Vector.segment_intersection(a, b, c, d)
        [5, 5]
        '''
        #Yaaay! I love linear algebra applied within the realms of geometry.
        x1, x2, x3, x4 = float(v1[0]), float(v2[0]), float(v3[0]), float(v4[0])
        y1, y2, y3, y4 = float(v1[1]), float(v2[1]), float(v3[1]), float(v4[1])
        #This is mostly the same as the line_intersection
        u = (x1 * y2 - y1 * x2)
        v = (x3 * y4 - y3 * x4)
        denom = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4)
        if denom == 0:
            return None

        px = (u * (x3 - x4) - (x1 - x2) * v) / denom
        py = (u * (y3 - y4) - (y1 - y2) * v) / denom
        #Here are the new bits
        c1 = (x1 <= px <= x2) or (x2 <= x1 <= px)
        c2 = (y1 <= py <= y2) or (y2 <= py <= y1)
        c3 = (x3 <= px <= x4) or (x4 <= px <= x3)
        c4 = (y3 <= py <= y4) or (y4 <= py <= y3)

        if (c1 and c2) and (c3 and c4):
            return Vector(px, py)
        else:
            return None
dataset/ETHPy150Open kivy/kivy/kivy/vector.py/Vector.segment_intersection/swapped operands of `<=`