Sign macro fix

This commit is contained in:
Benjamin Vedder 2021-11-27 23:30:10 +01:00
parent c5c309e227
commit 40c2842aa8
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@ uint16_t utils_median_filter_uint16_run(uint16_t *buffer,
unsigned int *buffer_index, unsigned int filter_len, uint16_t sample);
const char* utils_hw_type_to_string(HW_TYPE hw);
// Return the sign of the argument. -1 if negative, 1 if zero or positive.
#define SIGN(x) ((x < 0) ? -1 : 1)
// Return the sign of the argument. -1.0 if negative, 1.0 if zero or positive.
#define SIGN(x) (((x) < 0.0) ? -1.0 : 1.0)
// Squared
#define SQ(x) ((x) * (x))