delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/17/16:53:06

Message-ID: <36797CF5.201C338E@pge.com>
Date: Thu, 17 Dec 1998 13:51:49 -0800
From: Mike Purtell <mtp4 AT pge DOT com>
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
Subject: Re: sin() and cos() ???
References: <199812171828 DOT SAA24751 AT remus DOT clara DOT net>
Reply-To: djgpp AT delorie DOT com

No kiddin ! and I thought you were.
The math.h is 3.14159265358979323846  !

Applause !!!!

Mike...


Arthur wrote:

> > 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).
>
> James Arthur - jaa AT arfa DOT clara DOT net
> http://www.jado.org/users/arfa/
> ICQ#15054819

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019