aboutsummaryrefslogtreecommitdiffstats
path: root/test/common.h
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2021-02-23 23:40:08 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2021-02-23 23:40:08 +0300
commit8d6e37d2dc1680c4eabc70e2d6f29d72a6f641df (patch)
tree461be21b25ac48c96498ecf3580f47d6176fbfae /test/common.h
parentddaa6e43181634a4bce08f25ed5ecc0c9af94998 (diff)
downloadlibgha-8d6e37d2dc1680c4eabc70e2d6f29d72a6f641df.tar.gz
Fix warnings
Diffstat (limited to 'test/common.h')
-rw-r--r--test/common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/common.h b/test/common.h
index 2823df3..6757422 100644
--- a/test/common.h
+++ b/test/common.h
@@ -1,15 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <math.h>
static inline int compare_phase(float a, float b, float delta) {
- if (abs(a - b) < delta)
+ if (fabs(a - b) < delta)
return 0;
a = fmod(a + M_PI, 2 * M_PI);
b = fmod(b + M_PI, 2 * M_PI);
// fprintf(stderr, "%f %f %f\n", a, b, delta);
- if (abs(a - b) < delta)
+ if (fabs(a - b) < delta)
return 0;
return -1;
}