Proper check for rawzor libraries.
[rawtherapee-fixes.git] / rtengine / minmax.h
blob5e1dae35e0647a9ef8fc433a4180124728194760
1 /*
2 * This file is part of RawTherapee.
4 * Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
6 * RawTherapee is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * RawTherapee is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
19 #define MINMAX3(a,b,c,min,max) \
20 { \
21 if ((a)<(b)) { \
22 if ((b)<(c)) { \
23 (min) = (a); \
24 (max) = (c); \
25 } \
26 else { \
27 (max) = (b); \
28 if ((a)<(c)) \
29 (min) = (a); \
30 else \
31 (min) = (c); \
32 } \
33 } else { \
34 if ((b)>(c)) { \
35 (min) = (c); \
36 (max) = (a); \
37 } \
38 else { \
39 (min) = (b); \
40 if ((a)>(c)) \
41 (max) = (a); \
42 else \
43 (max) = (c); \
44 } \
45 } \
48 #define MIN3(a,b,c,min) \
49 { \
50 if ((a)<(b)) { \
51 if ((a)<(c)) \
52 (min) = (a); \
53 else \
54 (min) = (c); \
55 } else { \
56 if ((b)>(c)) \
57 (min) = (c); \
58 else \
59 (min) = (b); \
60 } \
63 #define MAX3(a,b,c,min) \
64 { \
65 if ((a)>(b)) { \
66 if ((a)>(c)) \
67 (max) = (a); \
68 else \
69 (max) = (c); \
70 } else { \
71 if ((b)<(c)) \
72 (max) = (c); \
73 else \
74 (max) = (b); \
75 } \