Skip to content

Commit f66b82b

Browse files
author
Amogh Singhal
authored
Update bresenham_line_algorithm.py
1 parent f0d293d commit f66b82b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bresenham_line_algorithm.py

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# 3. The equation of the straight line is y = m*x+c. So the next thing we need to find is the intercept c
1313
# 4. Intercept can be derived using the formula c = y1 - m*x1
1414
# 5. To get the next point, we add dx to the x-cordinate and dy to the y cordinate
15+
# 6. We continue this cycle until we reach (x2, y2)
1516

1617
def lineGenerator(x1, y1, x2, y2):
1718
dx = x2 - x1

0 commit comments

Comments
 (0)