Message-Id: <4.1.19981218094138.00a7cf00@hal.nt.tuwien.ac.at> X-Sender: tony AT dictator DOT nt DOT tuwien DOT ac DOT at X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Fri, 18 Dec 1998 09:52:51 +0100 To: djgpp AT delorie DOT com From: Anton Helm Subject: RE: sin() and cos() ??? In-Reply-To: <199812171828.SAA24751@remus.clara.net> References: <199812171034 DOT FAA02881 AT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com At 18:27 17.12.98 +0000, Arthur wrote: >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). > PI is not ANSI (checked) and as far as I know it isn't POSIX either (unchecked). So if you want a portable code you should have a #ifndef PI #define PI 3.1415..... #endif somewhere (well, preferably in a *.h file) in your program. Although PI and M_PI are #defined on lots of systems you can't rely on them. Tony