blob: 6c960158dd96b486758dc1f81a4333586c82d55b [file] [log] [blame]
Andrew Jeffery4622cad2020-11-03 22:20:18 +10301#ifndef _RANGE_H
2#define _RANGE_H
3
4#define MIN(a, b) \
5 ({ \
6 typeof(a) _a = a; \
7 typeof(b) _b = b; \
8 _a < _b ? _a : _b; \
9 })
10
11#define MAX(a, b) \
12 ({ \
13 typeof(a) _a = a; \
14 typeof(b) _b = b; \
15 _a > _b ? _a : _b; \
16 })
17
18#endif