summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-06-01 10:43:37 +0200
committerMattes D <github@xoft.cz>2014-06-01 10:43:37 +0200
commit2059944d1e39e952c164b8a87c0c3f216b3b731e (patch)
treefd210c1cf1bfcda2f7ed1292df01a26f9555c057 /src/Defines.h
parentInitial commit of the Generator article. (diff)
parentUpdated AlchemistVillage prefabs. (diff)
downloadcuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.gz
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.bz2
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.lz
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.xz
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.tar.zst
cuberite-2059944d1e39e952c164b8a87c0c3f216b3b731e.zip
Diffstat (limited to 'src/Defines.h')
-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..563fc308c 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 T Diff(T a_Val1, T a_Val2)
+{
+ return std::abs(a_Val1 - a_Val2);
+}
+
+
+
+
+
// tolua_begin
enum eMessageType