aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_draw_sprite.c')
-rw-r--r--src/ft_draw_sprite.c4
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];