diff options
Diffstat (limited to 'src/utility.h')
-rw-r--r-- | src/utility.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/utility.h b/src/utility.h index ab5ecfcac..10b7af638 100644 --- a/src/utility.h +++ b/src/utility.h @@ -585,15 +585,6 @@ inline bool isInArea(v3s16 p, v3s16 d) ); } -inline s16 rangelim(s16 i, s16 min, s16 max) -{ - if(i < min) - return min; - if(i > max) - return max; - return i; -} - inline s16 rangelim(s16 i, s16 max) { if(i < 0) @@ -603,6 +594,8 @@ inline s16 rangelim(s16 i, s16 max) return i; } +#define rangelim(d, min, max) ((d) < (min) ? (min) : ((d)>(max)?(max):(d))) + inline v3s16 arealim(v3s16 p, s16 d) { if(p.X < 0) |