We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5c309e commit 40c2842Copy full SHA for 40c2842
utils.h
@@ -67,8 +67,8 @@ uint16_t utils_median_filter_uint16_run(uint16_t *buffer,
67
unsigned int *buffer_index, unsigned int filter_len, uint16_t sample);
68
const char* utils_hw_type_to_string(HW_TYPE hw);
69
70
-// Return the sign of the argument. -1 if negative, 1 if zero or positive.
71
-#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)
72
73
// Squared
74
#define SQ(x) ((x) * (x))
0 commit comments