microui  14.2.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  * @file
17  * @brief Utility functions
18  *
19  * @author MicroEJ Developer Team
20  * @version 14.2.0
21  */
22 
23 // -----------------------------------------------------------------------------
24 // Macros and defines
25 // -----------------------------------------------------------------------------
26 
27 /*
28  * @brief Gets the lowest value.
29  */
30 #ifndef MIN
31 #define MIN(a, b) ((a) < (b) ? (a) : (b))
32 #endif
33 
34 /*
35  * @brief Gets the highest value.
36  */
37 #ifndef MAX
38 #define MAX(a, b) ((a) > (b) ? (a) : (b))
39 #endif
40 
41 // --------------------------------------------------------------------------------
42 // EOF
43 // --------------------------------------------------------------------------------
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif // UI_UTIL_H