aboutsummaryrefslogtreecommitdiffstats
path: root/Macros.h
blob: cb84b2916af4a8f3d94400cd0a2ac338dc9a63d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef HEADER_Macros
#define HEADER_Macros

#ifndef MINIMUM
#define MINIMUM(a, b)		((a) < (b) ? (a) : (b))
#endif

#ifndef MAXIMUM
#define MAXIMUM(a, b)		((a) > (b) ? (a) : (b))
#endif

#ifndef CLAMP
#define CLAMP(x, low, high)	(((x) > (high)) ? (high) : MAXIMUM(x, low))
#endif

#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy