diff options
author | Alfred E. Heggestad <aeh@db.org> | 2016-03-21 22:13:04 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2016-03-21 22:13:04 +0100 |
commit | 5860fdb9a9b26e37852520d4598749f65f893bb5 (patch) | |
tree | 2fbc7a6ec5ccde2d49c3ea79106880126a1de7ed /test/test.c | |
parent | ffe31320d624f61afc536570853538c9df227254 (diff) |
mos: add pseudo Mean Opinion Score routine
thanks to Lorenzo Mangani for the original patch
Diffstat (limited to 'test/test.c')
-rw-r--r-- | test/test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c index 59e1cd1..8623180 100644 --- a/test/test.c +++ b/test/test.c @@ -1,3 +1,4 @@ +#include <math.h> #include <re.h> #include <baresip.h> #include "test.h" @@ -35,3 +36,9 @@ int re_main_timeout(uint32_t timeout_ms) tmr_cancel(&tmr); return err; } + + +bool test_cmp_double(double a, double b, double precision) +{ + return fabs(a - b) < precision; +} |