Mail Archives: djgpp/1998/12/18/04:42:32
alrighty then:
#include <math.h>
float sin_d(float x){
return sin(x*M_PI/180);
}
----------
> From: Johan Henriksson <johan DOT he AT telia DOT com>
> To: djgpp AT delorie DOT com
> Subject: Re: sin() and cos() ???
> Date: Thursday, December 17, 1998 11:52 PM
>
> from Johan Henriksson
> Primary: johan DOT he AT telia DOT com
> Second: jhe75 AT hotmail DOT com Third: johan_he AT yahoo DOT com
> HTTP://come.to/jhewok
> -----Original Message-----
> From: Arthur <arfa AT clara DOT net>
> To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
> Date: Thursday, December 17, 1998 11:44 PM
> Subject: RE: sin() and cos() ???
>
>
> >> off course you know that but...
> >>
> >> make it like this:
> >>
> >> float sin_d(float x){
> >> return sin(x*3.1415926/180);
> >> }
> >
> >I think in math.h, there is a definition called PI. This is much more
> >accurate than what you've got here.
> >
> >So you can use sin(x*PI/180); instead (easier).
> >
>
> Easier but not needed. I think no one will notice the difference between
> 3.1415926 and 3.1415926........... And another thing; I where also fooled
to
> belive that units ment radians, not degrees. Maybe someone should update
the
> help before more people come and fall into this pit?
>
> >
> >James Arthur - jaa AT arfa DOT clara DOT net
> >http://www.jado.org/users/arfa/
> >ICQ#15054819
> >
> >
> >
- Raw text -