From 7148f1222e03303f4f894f4a4c9b3719d17a2f9e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 25 Apr 2021 22:20:57 -0700 Subject: [PATCH] bug in bresenham lines --- shell/data.limg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/data.limg b/shell/data.limg index 88adeeee..c61ebe98 100644 --- a/shell/data.limg +++ b/shell/data.limg @@ -21,8 +21,8 @@ (- 0 (abs (- y1 y0))) (sgn (- x1 x0)) (sgn (- y1 y0))))) - (brline1 . (fn () (screen x y xmax ymax dx dy sx sy err color) - (while (or (< x xmax) (< y ymax)) + (brline1 . (fn () (screen x y xlast ylast dx dy sx sy err color) + (while (not (and (= x xlast) (= y ylast))) (pixel screen x y color) ((fn (e2) (if (>= e2 dy)