From 8e6080e73661cc8747b21b1153e4336796575cf7 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Fri, 14 Feb 2020 18:47:19 +0100 Subject: Norme is bav --- src/ft_detect.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/ft_detect.c') diff --git a/src/ft_detect.c b/src/ft_detect.c index 7153123..bfc4449 100644 --- a/src/ft_detect.c +++ b/src/ft_detect.c @@ -1,9 +1,21 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_detect.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:22:11 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:23:42 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + #include #include #include static void -ft_detection_init_y(t_cub *cl) + ft_detection_init_y(t_cub *cl) { cl->rlist.y_delta_dist = sqrt(1 + (cl->rlist.x_ray_dir * cl->rlist.x_ray_dir) / (cl->rlist.y_ray_dir * @@ -23,7 +35,7 @@ ft_detection_init_y(t_cub *cl) } static void -ft_detection_init_x(t_cub *cl) + ft_detection_init_x(t_cub *cl) { cl->rlist.x_delta_dist = sqrt(1 + (cl->rlist.y_ray_dir * cl->rlist.y_ray_dir) / (cl->rlist.x_ray_dir * @@ -44,10 +56,10 @@ ft_detection_init_x(t_cub *cl) } void -ft_detect(t_cub *cl) + ft_detect(t_cub *cl) { ft_detection_init_x(cl); - cl->rlist.hit = 0; + cl->rlist.hit = 0; while (cl->rlist.hit == 0) { if (cl->rlist.x_side_dist < cl->rlist.y_side_dist) -- cgit v1.2.3