rotation foncionne yeah

This commit is contained in:
hugogogo
2021-07-22 20:18:22 +02:00
parent 14179207ba
commit 964c83478d
3 changed files with 1 additions and 1 deletions

Binary file not shown.

BIN
fdf

Binary file not shown.

View File

@@ -32,7 +32,7 @@ void draw_lines(t_fdf *fdf, int *start, int *end)
if ((dx + dy) && (i + j))
z = start[2] + (end[2] - start[2]) * (i + j) / (dx + dy);
draw_color_pixel(fdf, start[0] + i, start[1] + j, z);
if (!dx || j < i * dy / dx)
if (!ft_abs(dx) || ft_abs(j) < ft_abs(i * dy / dx))
j += ft_sign(dy);
else
i += ft_sign(dx);