Bresenham's Line Algorithm

Project: bresenham

Is this different from how the browser draws lines? Oh, maybe, because of antialiasing.

yes, see: Xiaolin Wu's line algorithm - Wikipedia

i think browsers draw lines by drawing a rectangle out of two triangles, and the gpu does the triangle filling

Oh, that's clever!