Rasterization
Bresenham Line
Rasterize a shallow line with an integer decision variable, avoiding rounding at each pixel.
bresenham-line
Naive DDA steps along a line and rounds to pixels. Bresenham keeps an integer error value instead, so each step decides whether the next pixel stays level or moves up.