-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathis_inside_map.c
25 lines (23 loc) · 1.13 KB
/
is_inside_map.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* is_inside_map.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abenheni <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/04 13:30:29 by abenheni #+# #+# */
/* Updated: 2023/12/04 13:30:30 by abenheni ### ########.fr */
/* */
/* ************************************************************************** */
#include "render_map.h"
bool is_inside_map(t_data *info, double next_x, double next_y)
{
if (next_x >= 0 && next_x <= info->map_width * TILE_SIZE)
{
if (next_y >= 0 && next_y <= info->map_height * TILE_SIZE)
{
return (true);
}
}
return (false);
}