-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacros.h
43 lines (37 loc) · 1.09 KB
/
macros.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef LIBS_MACROS_H_INCLUDED
#define LIBS_MACROS_H_INCLUDED
/**
* @def MAX
* @brief Returns the maximum value between two values.
*
* @warning The value of `a` and `b` parameters must be an integer or float.
*/
#define MAX(a, b) a > b ? a : b;
/**
* @def MIN
* @brief Returns the minimum value between two values.
*
* @warning The value of `a` and `b` parameters must be an integer or float.
*/
#define MIN(a, b) a > b ? b : a;
/**
* @def MAXIMUM_DELAY
* @brief Defines the maximum delay in milliseconds.
*
* This macro is used to define the maximum delay for a delay input.
* It is typically used in conjunction with the `MINIMUM_DELAY`.
*
* @warning The value of `MAXIMUM_DELAY` must be a positive integer.
*/
#define MAXIMUM_DELAY 1000
/**
* @def MINIMUM_DELAY
* @brief Defines the minimum delay in milliseconds.
*
* This macro is used to define the minimum delay for a delay input.
* It is typically used in conjunction with the `MAXIMUM_DELAY`.
*
* @warning The value of `MINIMUM_DELAY` must be a positive integer.
*/
#define MINIMUM_DELAY 0
#endif // LIBS_MACROS_H_INCLUDED