Revision 335
more docs
utils.h | ||
---|---|---|
51 | 51 |
* @param b Second value |
52 | 52 |
* @return The minimum of the two values |
53 | 53 |
*/ |
54 |
int16_t min16(int16_t a, int16_t b); |
|
55 |
uint16_t umin16(uint16_t a, uint16_t b); |
|
56 |
int32_t min32(int32_t a, int32_t b); |
|
57 |
double dmin (double a, double b); |
|
54 |
int16_t min_16(int16_t a, int16_t b); |
|
55 |
/// @overload |
|
56 |
uint16_t min_u16(uint16_t a, uint16_t b); |
|
57 |
/// @overload |
|
58 |
int32_t min_32(int32_t a, int32_t b); |
|
59 |
/// @overload |
|
60 |
double min_d(double a, double b); |
|
58 | 61 |
|
59 | 62 |
/** |
60 | 63 |
* @brief Gets the maximum value out of two values. |
... | ... | |
62 | 65 |
* @param b Second value |
63 | 66 |
* @return The maximum of the two values |
64 | 67 |
*/ |
65 |
int16_t max16(int16_t a, int16_t b); |
|
66 |
uint16_t umax16(uint16_t a, uint16_t b); |
|
67 |
int32_t max32(int32_t a, int32_t b); |
|
68 |
double dmax (double a, double b); |
|
68 |
int16_t max_16(int16_t a, int16_t b); |
|
69 |
/// @overload |
|
70 |
uint16_t max_u16(uint16_t a, uint16_t b); |
|
71 |
/// @overload |
|
72 |
int32_t max_32(int32_t a, int32_t b); |
|
73 |
/// @overload |
|
74 |
double max_d(double a, double b); |
|
69 | 75 |
|
70 | 76 |
/** |
71 | 77 |
* @brief Get the absolute value of a double. |
72 | 78 |
* @param a Argument |
73 | 79 |
* @return Absolute value of a |
74 | 80 |
*/ |
75 |
double dabs(double a);
|
|
81 |
double abs_d(double a);
|
|
76 | 82 |
|
77 | 83 |
/** |
78 | 84 |
* @brief Compare if two doubles are approximately equal (within 1e-10). |
... | ... | |
80 | 86 |
* @param b Second value |
81 | 87 |
* @return true if the two numbers are approximately equal, false otherwise |
82 | 88 |
*/ |
83 |
int deq(double a, double b);
|
|
89 |
int eq_d(double a, double b);
|
|
84 | 90 |
|
85 | 91 |
/** |
86 | 92 |
* @} |
Also available in: Unified diff