Date: Sun, 28 Feb 1999 14:19:17 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Paul Derbyshire cc: djgpp AT delorie DOT com Subject: Re: sin, cos ?? In-Reply-To: <3.0.6.32.19990227021519.0088c6f0@pop.globalserve.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Sat, 27 Feb 1999, Paul Derbyshire wrote: > Ack! Macros! > > const long double pi = 3.141592653589793 Don't ``invent'' Pi, use the constant M_PI. > template // 'F' as in 'Floating point' > inline F deg2rad (F deg) { return deg*pi/180.0; } You don't need to go to C++ just to have inline functions. > There. Nice and type-safe and free of bogons with arguments that have side > effects. The macros Nate suggested don't have any side effects.