aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_floor_cast_inits.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 14:24:57 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 14:24:57 +0200
commit8a695d62dcb9b8783918263f962b986df20310f2 (patch)
tree37e3c4e286abcec481bbc8169c7297e1ec07b578 /src/ft_floor_cast_inits.c
parentLater (diff)
download42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.gz
42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.bz2
42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.xz
42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.zst
42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.zip
Correct dir_x dir_y sqy sqx
Diffstat (limited to 'src/ft_floor_cast_inits.c')
-rw-r--r--src/ft_floor_cast_inits.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_floor_cast_inits.c b/src/ft_floor_cast_inits.c
index 92b660b..22c735a 100644
--- a/src/ft_floor_cast_inits.c
+++ b/src/ft_floor_cast_inits.c
@@ -33,10 +33,10 @@ void
void
ft_floor_cast_inits(uint16_t y, t_ray *rl, t_cub *cl)
{
- rl->x_f_ray_dir = cl->plist.dir_x - cl->plist.plane_x;
- rl->y_f_ray_dir = cl->plist.dir_y - cl->plist.plane_y;
- rl->x_f_ray_dir_bis = cl->plist.dir_x + cl->plist.plane_x;
- rl->y_f_ray_dir_bis = cl->plist.dir_y + cl->plist.plane_y;
+ rl->x_f_ray_dir = cl->plist.dir_y - cl->plist.plane_x;
+ rl->y_f_ray_dir = cl->plist.dir_x - cl->plist.plane_y;
+ rl->x_f_ray_dir_bis = cl->plist.dir_y + cl->plist.plane_x;
+ rl->y_f_ray_dir_bis = cl->plist.dir_x + cl->plist.plane_y;
rl->p = y - cl->wlist.y_size / 2;
cl->plist.pos_z = 0.5 * cl->wlist.y_size;
rl->row_dist = cl->plist.pos_z / rl->p;