3 ms·
#define tau 6.2831853 If you haven't gotten around to it, today's a good day.
by Dove 15y ago
#define tau 6.2831853
If you haven't gotten around to it, today's a good day.
- hdevalence2 15y agoWouldn't it be better to do #define M_TAU = (2.0*M_PI) instead, so that it's clear that it's a math constant instead of a local variable? Also, I suspect that the math.h pi constant is accurate to more than 8 decimal places, so this way you don't lose precision.
- Dove 15y agoWhatever is appropriate in your context. :) What I really mean is this: use it. If you're a tauist, but tau isn't in your header file / constant library / whatever you use, today might be a good day to put it there.