-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrad.c
More file actions
25 lines (18 loc) · 985 Bytes
/
Copy pathrad.c
File metadata and controls
25 lines (18 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* <html>
<title>rad.c - (c) G.S.Stachowski, 1998</title>
<body bgcolor="white" fgcolor="black"><p>
<b><font color="darkred">rad.c</font> - (c) <a href="mailto:greg@froggie.freeservers.com">G.S.Stachowski</a>, 1998</b><br>
Functions to do <font color="darkred">degree -> radian</font> and <font color="darkred">radian -> degree</font> conversion.<p>
<i>All HTML in this program is contained within </i> C <i> comment markers.
If you either copy-paste from the screen, "save as text" or even
save the HTML source, you will have a working </i>C<i> program source code.</i>
<xmp>*/
#include <math.h>
double rad(double val) { /* degree -> radian conversion */
return(val*M_PI/180.0);
}
double deg(double val) { /* radian -> degree conversion */
return(val*180.0/M_PI);
}
/*</xmp><! ------------------------------------------------------------------>
<hr><img align=right border=0 src="../../graphics/fish-s.jpg"></body></html>*/