def line(x1, y1, x2, y2):
x1 = normalize(x1)<EOL>y1 = normalize(y1)<EOL>x2 = normalize(x2)<EOL>y2 = normalize(y2)<EOL>xdiff = max(x1, x2) - min(x1, x2)<EOL>ydiff = max(y1, y2) - min(y1, y2)<EOL>xdir = <NUM_LIT:1> if x1 <= x2 else -<NUM_LIT:1><EOL>ydir = <NUM_LIT:1> if y1 <= y2 else -<NUM_LIT:1><EOL>r = max(xdiff, ydiff)<EOL>for i in range(r+<NUM_LIT:1>):<EOL><INDENT>x = x1<EOL>y = y1<EOL>if ydiff:<EOL><INDENT>y += (float(i) * ydiff) / r * ydir<EOL><DEDENT>if xdiff:<EOL><INDENT>x += (float(i) * xdiff) / r * xdir<EOL><DEDENT>yield (x, y)<EOL><DEDENT>
Returns the coords of the line between (x1, y1), (x2, y2)

    :param x1: x coordinate of the startpoint
    :param y1: y coordinate of the startpoint
    :param x2: x coordinate of the endpoint
    :param y2: y coordinate of the endpoint