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