diff --git a/game/raycasting.c b/game/raycasting.c index cb690e2..2f76916 100644 --- a/game/raycasting.c +++ b/game/raycasting.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/27 14:30:29 by erey-bet #+# #+# */ -/* Updated: 2023/05/05 12:57:44 by erey-bet ### ########.fr */ +/* Updated: 2023/05/05 13:59:57 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,7 +25,7 @@ int ray(t_game *game) ray = &game->ray; while (x < WIDTH) { - camera = 2 * x / ((double)(WIDTH - 1)); + camera = 2 * x / (double)WIDTH - 1; ray->dir_x = p->dir_x + p->pla_x * camera; ray->dir_y = p->dir_y + p->pla_y * camera; dda(game, x);