4 ms·
EDIT: "Didn't require any multiply or divide operations." Oof. Sorry.
by dreamcompiler 3y ago
EDIT: "Didn't require any multiply or divide operations." Oof. Sorry.
- lttlrck 3y agoIt's been a long time but IIRC Bresenhams needs one divide? I spent hours try to get rid of it...
- dreamcompiler 3y agoYou have to do a shift or two but no divides. That's the beauty of Bresenham's: You can draw the line without ever explicitly computing the slope. In effect, Bresenham ends up performing a division by repeated subtraction. And at every subtraction step, it outputs a pixel.