Skip to content

Commit

Permalink
Bugfix in tgl_line.
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-graj committed Feb 10, 2022
1 parent fc056a6 commit ddda1d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/termgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void tgl_line(TGL * const tgl, int x0, int y0, float z0, uint8_t i0, int x1, int
int d = (dx + dx) - dy;
int x = x0;
int y;
for (y = y0; y < y1; y++) {
for (y = y0; y <= y1; y++) {
SET_PIXEL(tgl, x, y,
((y - y0) * z1 + (y1 - y) * z0) / dx,
INTENSITY_TO_CHAR(tgl, ((y - y0) * i1 + (y1 - y) * i0) / dy), color);
Expand Down

0 comments on commit ddda1d0

Please sign in to comment.