diff options
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index e0147e5..99da0dd 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -86,6 +86,9 @@ # define MAX4(a,b,c,d) MAX(MAX(a,b),MAX(c,d)) #endif +/* limit the middle value to be within a range (inclusive) */ +#define RANGE(LO,X,HI) MAX(LO,MIN(X,HI)) + /* absolute value */ #ifndef ABS # define ABS(a) (((a)>=0) ? (a) : -(a)) |