Mail Archives: djgpp/1999/02/28/14:54:14
At 02:15 AM 2/27/99 -0500, I wrote:
>At 12:19 PM 2/25/99 -0800, you wrote:
>>Paradox wrote:
>>>
>>> Is there another function that uses degrees?
>>
>>No, but you can easily convert between the two.
>>
>>#include <math.h>
>>#define DEG2RAD(deg) ((deg)*(M_PI/180.0))
>>#define RAD2DEG(rad) ((rad)*(180.0/M_PI))
>
>Ack! Macros!
>
>const long double pi = 3.141592653589793
>
>template <class F> // 'F' as in 'Floating point'
>inline F deg2rad (F deg) { return deg*pi/180.0; }
>
>template <class F>
>inline F rad2deg (F rad) { return 180.0*rad/pi; }
>
>There. Nice and type-safe and free of bogons with arguments that have side
>effects. More readable too, just as inlined and quick, and moreover, if you
>have egcs you can stick these in your own namespace and keep them from
>cluttering the global one.
>
>--
> .*. "Clouds are not spheres, mountains are not cones, coastlines are not
>-() < circles, and bark is not smooth, nor does lightning travel in a
> `*' straight line." -------------------------------------------------
> -- B. Mandelbrot |http://surf.to/pgd.net
>_____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net
>Programmer & Humanist|ICQ: 10423848|
>
>
...and your listserver sent it to me now at 13:47 2/28/99, about 36 hours
later and after I had already received several replies and made several
replies to the replies and gotten several replies to *those* ... !
What the heck's wrong with it? It should be a FIFO queue, right? And it
certainly shouldn't send a list message to Eli nearly immediately and then
wait about a whole DAY to then send me my copy!
Even if there are billions of subscribers and after getting a message it
does take a whopping 24+ hours to go from A to Z sending copies to all of
these subscribers, my last name begins with a D, and his begins with a Z...
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot |http://surf.to/pgd.net
_____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|
- Raw text -