diff options
author | JSDurand <mmemmew@gmail.com> | 2021-07-12 12:07:30 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-07-12 12:07:30 +0800 |
commit | d073f301aa94cd7a8278681d8d723d74fa5d5d3f (patch) | |
tree | afb67e8393307c5bec32ac7f8444854a8b3e6cd0 /util.c | |
parent | 75a875116f7060e5a0512b447123253d3c25946a (diff) |
Use double instead of float
I thought that a float has more precision than a double. Silly me.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |