Mail Archives: djgpp/1998/12/17/13:15:19
O.K. 2PIr-I get it... I use sin(degrees*(2PI/360)) and all is well.
I checked the djgpp info and there was no mention of units, only double
f(double). So I unfortunately ASSUMED degrees as the units.
doh!
thanks - Mike
Kertis Henderson wrote:
> Mike Purtell wrote:
> >
> > What am I missing ?
> >
> > I call ...
> >
> > #include <stdio.h>
> > #include <math.h>
> > ...
> > printf("The SIN of 45 Deg is %.2f\n",sin(45) );
> > and get .851 ??
> > and then
> > printf("The COS of 45 Deg is %.2f\n",cos(45) );
> > and get .525 ????
> > ...
> > I would expect .707 for both !
>
> The sine of 45 radians is .851, and the cosine of 45 radians is .525.
> These functions don't take degrees as arguments.
>
> --
>
> Kertis Henderson
> kertis AT frozenwave DOT com
- Raw text -