3 ms·
It's been a long time but IIRC Bresenhams needs one divide? I spent hours try to get rid of it...
by lttlrck 3y ago
It'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.