]> Shamusworld >> Repos - architektonas/blob - src/mathconstants.h
2385861ea165d3b3db3a869a6f20ed4ce5398061
[architektonas] / src / mathconstants.h
1 //
2 // Mathematical Constants used by Architektonas
3 //
4 // Part of the Architektonas Project
5 // (C) 2016 Underground Software
6 // See the README and GPLv3 files for licensing and warranty information
7 //
8 // NOTE: Since this has no code associated with it, there is no corresponding
9 //       .cpp file.
10 //
11 // JLH = James Hammons <jlhamm@acm.org>
12 //
13 // WHO  WHEN        WHAT
14 // ---  ----------  -----------------------------------------------------------
15 // JLH  04/01/2011  Created this file
16 // JLH  03/15/2016  Added Tau constants, removed Pi constants (Pi is wrong)
17 //
18
19 #define TAU                6.28318530717958647692528676655
20 #define TAU_1QTR           (TAU * 0.25)
21 #define TAU_2QTR           (TAU * 0.50)
22 #define TAU_3QTR           (TAU * 0.75)
23 #define RADIANS_TO_DEGREES (360.0 / TAU)
24 #define DEGREES_TO_RADIANS (TAU / 360.0)
25
26 // Convenience definitions
27 #define HALF_TAU           (TAU_2QTR)
28 #define QTR_TAU            (TAU_1QTR)
29 #define THREE_QTR_TAU      (TAU_3QTR)