OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e5953f
)
mesa: add macros MIN3 and MAX3
author
Marek Olšák
<maraeo@gmail.com>
Wed, 27 Apr 2011 10:53:58 +0000
(12:53 +0200)
committer
Marek Olšák
<maraeo@gmail.com>
Wed, 27 Apr 2011 11:16:35 +0000
(13:16 +0200)
src/mesa/main/macros.h
patch
|
blob
|
history
diff --git
a/src/mesa/main/macros.h
b/src/mesa/main/macros.h
index
86a58cc
..
01e4d20
100644
(file)
--- a/
src/mesa/main/macros.h
+++ b/
src/mesa/main/macros.h
@@
-669,6
+669,10
@@
do { \
/** Maximum of two values: */
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
+/** Minimum and maximum of three values: */
+#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C))
+#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
+
/** Dot product of two 2-element vectors */
#define DOT2( a, b ) ( (a)[0]*(b)[0] + (a)[1]*(b)[1] )