Content deleted Content added
m Reverted edits by 122.162.99.90 (talk) (HG) (3.4.10) |
Fix bug in code -- i must start at 0 to include both endpoints of the line. Consider what happens when step is 0. See https://www.geeksforgeeks.org/dda-line-generation-algorithm-computer-graphics/ for the loop starting with 0 |
||
Line 67:
x = x1;
y = y1;
i =
while (i <= step) {
putpixel(x, y, 5);
|