def linear(x1, y1, x2, y2):
    """ Returns m and c from y = mx + c """
    # y-y1 = m(x-x1)
    # m = (y2 - y1) / (x2 - x1)
    # y = (y2 - y1) / (x2 - x1) * (x - x1) + y1
    m = (y2 - y1) / (x2 - x1)
    c = y1 - m*x1
    return m, c