diff options
| author | Marc <marc.gilleron@gmail.com> | 2021-01-31 19:32:56 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-31 19:32:56 +0000 |
| commit | 1aab5e3962e311caebae04f44fff9c4e1cd7d9c0 (patch) | |
| tree | c55e3435691883c62bed6375c6b236a9715c85c7 /include/core/Defs.hpp | |
| parent | 2559c70e274f9239cd29c434ab262c46f6dc8552 (diff) | |
| parent | 35f78dea5196d4d676946a84c10206a5cb1a1fa0 (diff) | |
| download | redot-cpp-1aab5e3962e311caebae04f44fff9c4e1cd7d9c0.tar.gz | |
Merge branch 'master' into master
Diffstat (limited to 'include/core/Defs.hpp')
| -rw-r--r-- | include/core/Defs.hpp | 8 |
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 |
