1 min readJan 9, 2019
According to the logic of Mr. Bresenham it scales the line’s delta because we are working in pixel space. Notice that the entire algorithm works with integer math, not floating point. Without this you would have gaps. The for loops are designed to iterate one pixel at a time, not the actual line equation.