microui  4.0.0
microui
ui_util.h
1 /*
2  * C
3  *
4  * Copyright 2024 MicroEJ Corp. All rights reserved.
5  * Use of this source code is governed by a BSD-style license that can be found with this software.
6  */
7 
8 #ifndef UI_UTIL_H
9 #define UI_UTIL_H
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 // -----------------------------------------------------------------------------
16 // Macros and defines
17 // -----------------------------------------------------------------------------
18 
19 /*
20  * @brief Gets the lowest value.
21  */
22 #ifndef MIN
23 #define MIN(a,b) ((a) < (b) ? (a) : (b))
24 #endif
25 
26 /*
27  * @brief Gets the highest value.
28  */
29 #ifndef MAX
30 #define MAX(a,b) ((a) > (b) ? (a) : (b))
31 #endif
32 
33 // --------------------------------------------------------------------------------
34 // EOF
35 // --------------------------------------------------------------------------------
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 #endif // UI_UTIL_H