diff --git a/srcs/draw/raycast.c b/srcs/draw/raycast.c index c4c8e02..510cd3e 100644 --- a/srcs/draw/raycast.c +++ b/srcs/draw/raycast.c @@ -43,7 +43,7 @@ static void wall_length(t_rcast *rcast) if (rcast->slope_y) len /= ft_abs(rcast->slope_y); // len = (double)len * (double)rcast->screen_dist.end.y / (double)rcast->slope_x; - // len = rcast->screen_dist * len / (rcast->slope_x); + len = rcast->screen_dist * len / (rcast->slope_x); } else if (rcast->is_x == 0) { @@ -51,7 +51,7 @@ static void wall_length(t_rcast *rcast) if (rcast->slope_x) len /= ft_abs(rcast->slope_x); // len = (double)len * (double)rcast->screen_dist.end.y / (double)rcast->slope_y; - // len = rcast->screen_dist * len / (rcast->slope_y); + len = rcast->screen_dist * len / (rcast->slope_y); } rcast->ray_len = ft_abs(len); }