Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 723ab1a

Browse files
committedMay 6, 2017
Fix myfloor(0.0)
1 parent 0adc482 commit 723ab1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/util/numeric.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2828
#include "../threading/mutex.h"
2929

3030
#define rangelim(d, min, max) ((d) < (min) ? (min) : ((d) > (max) ? (max) : (d)))
31-
#define myfloor(x) ((x) > 0.0 ? (int)(x) : (int)(x) - 1)
31+
#define myfloor(x) ((x) < 0.0 ? (int)(x) - 1 : (int)(x))
3232
// The naive swap performs better than the xor version
3333
#define SWAP(t, x, y) do { \
3434
t temp = x; \

0 commit comments

Comments
 (0)
Please sign in to comment.