We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0d293d commit f66b82bCopy full SHA for f66b82b
bresenham_line_algorithm.py
@@ -12,6 +12,7 @@
12
# 3. The equation of the straight line is y = m*x+c. So the next thing we need to find is the intercept c
13
# 4. Intercept can be derived using the formula c = y1 - m*x1
14
# 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)
16
17
def lineGenerator(x1, y1, x2, y2):
18
dx = x2 - x1
0 commit comments