summaryrefslogtreecommitdiffstats
path: root/include/core/Defs.hpp
diff options
context:
space:
mode:
authorMarc Gilleron <marc.gilleron@gmail.com>2020-12-08 20:47:42 +0000
committerMarc Gilleron <marc.gilleron@gmail.com>2020-12-08 20:47:42 +0000
commitdeddacd6f725ff9f23b5fc476a70c9745d06b031 (patch)
treed4529db0bf7e65d90340a7d89e0e9a3201a8d3b9 /include/core/Defs.hpp
parent43828ebb3931b9117ad57f08cc457e052fdfd631 (diff)
downloadredot-cpp-deddacd6f725ff9f23b5fc476a70c9745d06b031.tar.gz
Fix some Math warnings
Diffstat (limited to 'include/core/Defs.hpp')
-rw-r--r--include/core/Defs.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/core/Defs.hpp b/include/core/Defs.hpp
index 67e3279..e90f6ce 100644
--- a/include/core/Defs.hpp
+++ b/include/core/Defs.hpp
@@ -70,9 +70,12 @@ enum class Error {
typedef float real_t;
-#define CMP_EPSILON 0.00001
+// This epsilon should match the one used by Godot for consistency.
+// Using `f` when `real_t` is float.
+#define CMP_EPSILON 0.00001f
#define CMP_EPSILON2 (CMP_EPSILON * CMP_EPSILON)
-#define Math_PI 3.14159265358979323846
+
+#define Math_PI 3.1415926535897932384626433833
#define Math_TAU 6.2831853071795864769252867666
#define _PLANE_EQ_DOT_EPSILON 0.999