1 /*
2  * This file is part of EasyRPG Player.
3  *
4  * EasyRPG Player is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * EasyRPG Player is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with EasyRPG Player. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef EP_UTIL_MACRO_H
19 #define EP_UTIL_MACRO_H
20 
21 // Macros / Templates
22 #ifdef max
23 #undef max
24 #endif
25 
26 #ifdef min
27 #undef min
28 #endif
29 
30 template <typename T>
max(T x,T y)31 T max(T x, T y) {
32     return (x >= y) ? x : y;
33 }
34 
35 template <typename T>
min(T x,T y)36 T min(T x, T y) {
37     return (x < y) ? x : y;
38 }
39 
40 #endif
41