1
0
Fork 0

Fix myfloor(0.0)

mutilcraft-mt53
ShadowNinja 2015-10-16 12:52:24 -04:00
parent 77597c4ff3
commit c6e96c645b
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "../threading/mutex.h" #include "../threading/mutex.h"
#define rangelim(d, min, max) ((d) < (min) ? (min) : ((d) > (max) ? (max) : (d))) #define rangelim(d, min, max) ((d) < (min) ? (min) : ((d) > (max) ? (max) : (d)))
#define myfloor(x) ((x) > 0.0 ? (int)(x) : (int)(x) - 1) #define myfloor(x) ((x) < 0.0 ? (int)(x) - 1 : (int)(x))
// The naive swap performs better than the xor version // The naive swap performs better than the xor version
#define SWAP(t, x, y) do { \ #define SWAP(t, x, y) do { \
t temp = x; \ t temp = x; \