forked from yoxeric/SilverMoss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.c
27 lines (24 loc) · 1.07 KB
/
utils.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
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yhachami <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/31 05:04:34 by yhachami #+# #+# */
/* Updated: 2023/09/04 20:39:43 by yhachami ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
float pythagoras(float a, float b)
{
return (sqrt((a * a) + (b * b)));
}
float circle(float fish)
{
if (fish >= 360)
fish -= 360;
if (fish < 0)
fish += 360;
return (fish);
}