Added macro: bound(min, val, max) is shorthand for min(maxval, max(val, minval)).

This commit is contained in:
Jeff Teunissen 2000-03-12 08:33:15 +00:00
parent ba97294a41
commit e1e663300c

View file

@ -56,6 +56,10 @@ void VID_UnlockBuffer (void);
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef bound
#define bound(a,b,c) (max(a, min(b, c))
#endif
/* This fixes warnings when compiling with -pedantic */
#if defined(__GNUC__) && !defined(inline)
# define inline __inline__