summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-11-20 14:08:58 -0800
committerCorbin Simpson <[email protected]>2009-11-20 14:08:58 -0800
commit37ba97421c5cf351e2e3c7c1e41ffd72fb73f7e9 (patch)
tree5c2a88f2248e4c5035ddff87f95aeccdbe766c38 /src
parentbeea241374a91b8aab81db175b28e98c2b4835d9 (diff)
util: Add MAX3 and MIN3.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_math.h3
1 files changed, 3 insertions, 0 deletions
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)