From: Corbin Simpson Date: Fri, 20 Nov 2009 22:08:58 +0000 (-0800) Subject: util: Add MAX3 and MIN3. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37ba97421c5cf351e2e3c7c1e41ffd72fb73f7e9;p=mesa.git util: Add MAX3 and MIN3. --- diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 75b075f160d..731a11475ec 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -499,6 +499,9 @@ util_next_power_of_two(unsigned x) #define MIN2( A, B ) ( (A)<(B) ? (A) : (B) ) #define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) +#define MIN3( A, B, C ) MIN2( MIN2( A, B ), C ) +#define MAX3( A, B, C ) MAX2( MAX2( A, B ), C ) + static INLINE int align(int value, int alignment)