X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2Fconst.h;fp=src%2Fgraphics%2Fconst.h;h=64175da0fecbce8db581cea55022f99f045e973b;hb=ffd31714f3edb64ebe16b65878750c6cc5c7e884;hp=0000000000000000000000000000000000000000;hpb=699437a474de8b87ccb6749d44adf740e680d620;p=space.git diff --git a/src/graphics/const.h b/src/graphics/const.h new file mode 100644 index 0000000..64175da --- /dev/null +++ b/src/graphics/const.h @@ -0,0 +1,17 @@ +#ifndef SPACE_CONST_H_ +#define SPACE_CONST_H_ + +namespace space { + +// this is so very darn long so it can easily be changed to double +constexpr float PI = 3.141592653589793238462643383279502884; +constexpr float PI2 = 2 * PI; + +template +constexpr int sigma(T v) { + return v > 0 ? 1 : (v < 0 ? -1 : 0); +} + +} + +#endif