Message-Id: <199812180942.EAA21706@delorie.com> From: "Robert Darmochwal" To: Subject: update: sin() and cos() ??? Date: Fri, 18 Dec 1998 10:41:23 +0100 X-MSMail-Priority: Normal X-Priority: 3 X-Mailer: Microsoft Internet Mail 4.70.1155 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com alrighty then: #include float sin_d(float x){ return sin(x*M_PI/180); } ---------- > From: Johan Henriksson > 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 > To: 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 > > > > > >