-
Notifications
You must be signed in to change notification settings - Fork 2
/
rad2deg.c
34 lines (29 loc) · 1.18 KB
/
rad2deg.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
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rad2deg.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: snicolet <snicolet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/06/04 22:10:25 by snicolet #+# #+# */
/* Updated: 2016/06/04 22:13:06 by snicolet ### ########.fr */
/* */
/* ************************************************************************** */
#include "rt.h"
#include <math.h>
double rad2deg(double rad)
{
return (rad * 180.0 / M_PI);
}
float rad2degf(float rad)
{
return ((float)((double)rad * 180.0 / M_PI));
}
double deg2rad(double deg)
{
return (deg / 180.0 * M_PI);
}
float deg2radf(float deg)
{
return ((float)((double)deg / 180.0 * M_PI));
}