tmp restore a 3d view

This commit is contained in:
hugogogo
2022-04-28 21:05:39 +02:00
parent 0557decc7a
commit 9042b373a9

View File

@@ -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);
}