Line drawing algorithm

I came up with (though I'm probably not the first) a line drawing algorithm based on the square distance between two points (also know as the Chebyshev distance). While it isnt the most efficent line drawing algorithm, it is easy to implement and always accurate.

To draw a line between the points (x1, y1) and (x2, y2),

d = max(abs(x2-x1), abs(y2-y1)) + 1

and for i from 0 to d do,

draw_point(x1 + (x2-x1) × i/d, y1 + (y2-y1) × i/d)