Skip to content

Commit 40c2842

Browse files
committed
Sign macro fix
1 parent c5c309e commit 40c2842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ uint16_t utils_median_filter_uint16_run(uint16_t *buffer,
6767
unsigned int *buffer_index, unsigned int filter_len, uint16_t sample);
6868
const char* utils_hw_type_to_string(HW_TYPE hw);
6969

70-
// Return the sign of the argument. -1 if negative, 1 if zero or positive.
71-
#define SIGN(x) ((x < 0) ? -1 : 1)
70+
// Return the sign of the argument. -1.0 if negative, 1.0 if zero or positive.
71+
#define SIGN(x) (((x) < 0.0) ? -1.0 : 1.0)
7272

7373
// Squared
7474
#define SQ(x) ((x) * (x))

0 commit comments

Comments
 (0)