]> git.localhorst.tv Git - space.git/blob - src/graphics/const.h
added autopilot that sucks
[space.git] / src / graphics / const.h
1 #ifndef SPACE_CONST_H_
2 #define SPACE_CONST_H_
3
4 namespace space {
5
6 // this is so very darn long so it can easily be changed to double
7 constexpr float PI = 3.141592653589793238462643383279502884;
8 constexpr float PI2 = 2 * PI;
9
10 template<class T>
11 constexpr int sigma(T v) {
12         return v > 0 ? 1 : (v < 0 ? -1 : 0);
13 }
14
15 }
16
17 #endif