From 60d6b13f6316eae652795abd1648426ad531981f Mon Sep 17 00:00:00 2001 From: Yoni Chechik Date: Tue, 17 May 2022 17:11:18 +0300 Subject: [PATCH] bugfix: next_pixel_in_line should be "-" instead of "+" for correct calculation of next pixel in "else" case --- src/rs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rs.cpp b/src/rs.cpp index b343018653..e92b3bca0a 100644 --- a/src/rs.cpp +++ b/src/rs.cpp @@ -3707,7 +3707,7 @@ void next_pixel_in_line(float curr[2], const float start[2], const float end[2]) else { curr[1] = end[1] > curr[1] ? curr[1] + 1 : curr[1] - 1; - curr[0] = end[0] - ((end[1] + curr[1]) / line_slope); + curr[0] = end[0] - ((end[1] - curr[1]) / line_slope); } }