diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-02-27 11:01:20 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-02-27 11:01:20 +0100 |
commit | 71cd0199fda68a84c5f9a5252bf63e69712b177b (patch) | |
tree | f53d9488a3b5663aa6697fb3e6f68c9a4ea03939 /source/Globals.h | |
parent | AnvilStats: Added ChunkExtract mode of operation, splitting Anvil files into individual chunks. (diff) | |
download | cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.gz cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.bz2 cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.lz cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.xz cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.tar.zst cuberite-71cd0199fda68a84c5f9a5252bf63e69712b177b.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Globals.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/Globals.h b/source/Globals.h index e536559dd..958c6d6ae 100644 --- a/source/Globals.h +++ b/source/Globals.h @@ -189,9 +189,10 @@ typedef unsigned short UInt16; /// Allows arithmetic expressions like "32 KiB" (but consider using parenthesis around it, "(32 KiB)" ) #define KiB * 1024 +#define MiB * 1024 * 1024 /// Faster than (int)floorf((float)x / (float)div) -#define FAST_FLOOR_DIV( x, div ) ( (x) < 0 ? (((int)x / div) - 1) : ((int)x / div) ) +#define FAST_FLOOR_DIV( x, div ) (((x) - (((x) < 0) ? ((div) - 1) : 0)) / (div)) // Own version of assert() that writes failed assertions to the log for review #ifdef _DEBUG |