mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-03-15 05:20:43 +00:00
Added macro: bound(min, val, max) is shorthand for min(maxval, max(val, minval)).
This commit is contained in:
parent
ba97294a41
commit
e1e663300c
1 changed files with 4 additions and 0 deletions
|
@ -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__
|
||||
|
|
Loading…
Reference in a new issue