summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-09 23:43:00 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-09 23:43:00 +0200
commiteb0f713b6a5a7107a97284d1728858b4b2882c3d (patch)
treec05c31e4fdc79938a5d0bada7e2ecea5977716b0 /src/Defines.h
parentAdd DIG_STATUS_CANCELLED packet and add item resend, when a block can't place/break. (diff)
downloadcuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.tar
cuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.tar.gz
cuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.tar.bz2
cuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.tar.lz
cuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.tar.xz
cuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.tar.zst
cuberite-eb0f713b6a5a7107a97284d1728858b4b2882c3d.zip
Diffstat (limited to '')
-rw-r--r--src/Defines.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 9fa3b3a8e..b0b209934 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -3,6 +3,7 @@
#include "ChatColor.h"
#include <limits>
+#include <cmath>
@@ -528,6 +529,15 @@ inline float GetSpecialSignf( float a_Val )
+template<class T> inline int Diff(T a_Val1, T a_Val2)
+{
+ return std::abs(a_Val1 - a_Val2);
+}
+
+
+
+
+
// tolua_begin
enum eMessageType