X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmathconstants.h;fp=src%2Fmathconstants.h;h=b0e516e339fead7ffe6c0cffb80ce12fa7ea1768;hb=0bd89e9489fa52f92545a7e94c4a31e863a5f898;hp=42f4940343c5119aa97867f63e225e01f643657e;hpb=3fe885b75511c9fbfe18a5c509260e83bb7ac136;p=ttedit diff --git a/src/mathconstants.h b/src/mathconstants.h index 42f4940..b0e516e 100644 --- a/src/mathconstants.h +++ b/src/mathconstants.h @@ -1,7 +1,7 @@ // Mathematical Constants used by Architektonas // // Part of the Architektonas Project -// (C) 2011 Underground Software +// (C) 2016 Underground Software // See the README and GPLv3 files for licensing and warranty information // // NOTE: Since this has no code associated with it, there is no corresponding @@ -10,14 +10,20 @@ // JLH = James Hammons // // WHO WHEN WHAT -// --- ---------- ------------------------------------------------------------ +// --- ---------- ----------------------------------------------------------- // JLH 04/01/2011 Created this file +// JLH 03/15/2016 Added Tau constants, removed Pi constants // -#define PI 3.14159265358979323846264338327 -#define PI_OVER_2 (PI / 2.0) -#define PI3_OVER_2 ((3.0 * PI) / 2.0) -#define PI_TIMES_2 (PI * 2.0) -#define RADIANS_TO_DEGREES (180.0 / PI) -#define DEGREES_TO_RADIANS (PI / 180.0) +#define TAU 6.28318530717958647692528676655 +#define TAU_1QTR (TAU * 0.25) +#define TAU_2QTR (TAU * 0.50) +#define TAU_3QTR (TAU * 0.75) +#define RADIANS_TO_DEGREES (360.0 / TAU) +#define DEGREES_TO_RADIANS (TAU / 360.0) + +// Convenience definitions +#define HALF_TAU (TAU_2QTR) +#define QTR_TAU (TAU_1QTR) +#define THREE_QTR_TAU (TAU_3QTR)