summaryrefslogtreecommitdiffstats
path: root/include/core/Defs.hpp
diff options
context:
space:
mode:
authorMarc <marc.gilleron@gmail.com>2021-01-31 19:32:56 +0000
committerGitHub <noreply@github.com>2021-01-31 19:32:56 +0000
commit1aab5e3962e311caebae04f44fff9c4e1cd7d9c0 (patch)
treec55e3435691883c62bed6375c6b236a9715c85c7 /include/core/Defs.hpp
parent2559c70e274f9239cd29c434ab262c46f6dc8552 (diff)
parent35f78dea5196d4d676946a84c10206a5cb1a1fa0 (diff)
downloadredot-cpp-1aab5e3962e311caebae04f44fff9c4e1cd7d9c0.tar.gz
Merge branch 'master' into master
Diffstat (limited to 'include/core/Defs.hpp')
-rw-r--r--include/core/Defs.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/Defs.hpp b/include/core/Defs.hpp
index fb0a18b..67e3279 100644
--- a/include/core/Defs.hpp
+++ b/include/core/Defs.hpp
@@ -61,11 +61,19 @@ enum class Error {
#include <GodotGlobal.hpp>
+// alloca() is non-standard. When using MSVC, it's in malloc.h.
+#if defined(__linux__) || defined(__APPLE__)
+#include <alloca.h>
+#else
+#include <malloc.h>
+#endif
+
typedef float real_t;
#define CMP_EPSILON 0.00001
#define CMP_EPSILON2 (CMP_EPSILON * CMP_EPSILON)
#define Math_PI 3.14159265358979323846
+#define Math_TAU 6.2831853071795864769252867666
#define _PLANE_EQ_DOT_EPSILON 0.999
#define _PLANE_EQ_D_EPSILON 0.0001