]> git.localhorst.tv Git - space.git/blobdiff - src/graphics/const.h
added autopilot that sucks
[space.git] / src / graphics / const.h
diff --git a/src/graphics/const.h b/src/graphics/const.h
new file mode 100644 (file)
index 0000000..64175da
--- /dev/null
@@ -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<class T>
+constexpr int sigma(T v) {
+       return v > 0 ? 1 : (v < 0 ? -1 : 0);
+}
+
+}
+
+#endif