fix: map directions
This commit is contained in:
parent
d1f2136b13
commit
571bf80c6e
2 changed files with 7 additions and 7 deletions
6
map.h
6
map.h
|
@ -3,10 +3,10 @@
|
|||
/* ::: :::::::: */
|
||||
/* map.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
|
||||
/* By: mcolonna <mcolonna@student.42perpignan.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/01 13:59:04 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/10/15 18:22:32 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/10/16 17:59:12 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -99,7 +99,7 @@ typedef struct s_map
|
|||
/// @brief An 2D array of all the cases.
|
||||
///
|
||||
/// Syntax to get a case: cases[y * width + x]
|
||||
/// x is left to right, y is top to bottom.
|
||||
/// x is west to east, y is north to south.
|
||||
t_map_case *cases;
|
||||
|
||||
/// @brief Represents the player in the map.
|
||||
|
|
8
utils.c
8
utils.c
|
@ -3,10 +3,10 @@
|
|||
/* ::: :::::::: */
|
||||
/* utils.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mcolonna <mcolonna@student.42.fr> +#+ +:+ +#+ */
|
||||
/* By: mcolonna <mcolonna@student.42perpignan.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/15 12:38:40 by mcolonna #+# #+# */
|
||||
/* Updated: 2024/10/15 17:21:16 by mcolonna ### ########.fr */
|
||||
/* Updated: 2024/10/16 18:01:25 by mcolonna ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
|||
|
||||
void vector_from_rotation(t_point_double *vec, double angle, double norm)
|
||||
{
|
||||
vec->x = -cos(angle) * norm;
|
||||
vec->y = sin(angle) * norm;
|
||||
vec->x = sin(angle) * norm;
|
||||
vec->y = -cos(angle) * norm;
|
||||
}
|
||||
|
||||
void write_err(const char *str, ...)
|
||||
|
|
Loading…
Add table
Reference in a new issue