diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 19:45:31 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-30 19:45:31 +0200 |
commit | 5b287c89362171175592c5eab247fb8a7b7d28ff (patch) | |
tree | 7319f00b79ee85a9e551b5ce5a89280e549fb5ca /src/ft_draw_sprite.c | |
parent | Pretty coolio (diff) | |
download | 42-cub3d-5b287c89362171175592c5eab247fb8a7b7d28ff.tar.gz 42-cub3d-5b287c89362171175592c5eab247fb8a7b7d28ff.tar.bz2 42-cub3d-5b287c89362171175592c5eab247fb8a7b7d28ff.tar.xz 42-cub3d-5b287c89362171175592c5eab247fb8a7b7d28ff.tar.zst 42-cub3d-5b287c89362171175592c5eab247fb8a7b7d28ff.zip |
Fine
Diffstat (limited to '')
-rw-r--r-- | src/ft_draw_sprite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c index e41484e..6df35a7 100644 --- a/src/ft_draw_sprite.c +++ b/src/ft_draw_sprite.c @@ -67,8 +67,8 @@ static void float dist; t_rgb rgb; - if ((dist = sqrtf(powf(cl->plist.pos_x - sprite->s_pos_x, 2) - + powf(cl->plist.pos_y - sprite->s_pos_y, 2))) <= 0) + if ((dist = sqrt(pow(cl->plist.pos_x - sprite->s_pos_x, 2) + + pow(cl->plist.pos_y - sprite->s_pos_y, 2))) <= 0) dist = 0.0001; rgb.r = (uint8_t)cl->tlist[sprite->current_sprite].ptr[sprite->tex_x * 4 + 4 * cl->tlist[sprite->current_sprite].img_w * sprite->tex_y + 2]; |