Skip to content

Commit

Permalink
Fix myfloor(0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja committed May 6, 2017
1 parent 77597c4 commit c6e96c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/numeric.h
Expand Up @@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "../threading/mutex.h"

#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
#define SWAP(t, x, y) do { \
t temp = x; \
Expand Down

0 comments on commit c6e96c6

Please sign in to comment.