From 9042b373a9e28efaa8caba707ed3d4789d3cefb2 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Thu, 28 Apr 2022 21:05:39 +0200 Subject: [PATCH] tmp restore a 3d view --- srcs/draw/raycast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }