aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/numeric.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/numeric.h b/src/util/numeric.h
index 5ed4d0e99..a028f1ff2 100644
--- a/src/util/numeric.h
+++ b/src/util/numeric.h
@@ -120,6 +120,7 @@ inline s16 rangelim(s16 i, s16 max)
}
#define rangelim(d, min, max) ((d) < (min) ? (min) : ((d)>(max)?(max):(d)))
+#define myfloor(x) ((x) > 0.0 ? (int)(x) : (int)(x) - 1)
inline v3s16 arealim(v3s16 p, s16 d)
{