diff options
author | Mattes D <github@xoft.cz> | 2014-05-15 21:16:04 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-15 21:16:04 +0200 |
commit | 0e43f886689db3701881861b5bc0fe7731959b93 (patch) | |
tree | dc75aae5676d6cb138d005ff274d57c114f6e3c9 /src/Defines.h | |
parent | Added doxy-comment requirement (diff) | |
parent | Fix compile error. (diff) | |
download | cuberite-0e43f886689db3701881861b5bc0fe7731959b93.tar cuberite-0e43f886689db3701881861b5bc0fe7731959b93.tar.gz cuberite-0e43f886689db3701881861b5bc0fe7731959b93.tar.bz2 cuberite-0e43f886689db3701881861b5bc0fe7731959b93.tar.lz cuberite-0e43f886689db3701881861b5bc0fe7731959b93.tar.xz cuberite-0e43f886689db3701881861b5bc0fe7731959b93.tar.zst cuberite-0e43f886689db3701881861b5bc0fe7731959b93.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Defines.h | 10 |
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 |