From d073f301aa94cd7a8278681d8d723d74fa5d5d3f Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 12 Jul 2021 12:07:30 +0800 Subject: Use double instead of float I thought that a float has more precision than a double. Silly me. --- util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index c5921e5..c998930 100644 --- a/util.c +++ b/util.c @@ -52,7 +52,7 @@ mix_waves(WaveFrag *frags, LENT len) LENT max_len = 0; - Pulse p = 0.0f; + Pulse p = 0.0; for (LENT i = 0; i < len; i++) max_len = max(max_len, (frags+i)->n); @@ -61,7 +61,7 @@ mix_waves(WaveFrag *frags, LENT len) wf.w = MYALLOC(Pulse, max_len); for (LENT i = 0; i < max_len; i++) { - p = 0.0f; + p = 0.0; for (LENT j = 0; j < len; j++) if (i < (frags+j)->n) p += *((frags+j)->w+i); -- cgit v1.2.3-18-g5258