Float data type

This commit is contained in:
Mark Hills 2011-12-11 14:39:46 +00:00
parent e3cfa32fc8
commit 4f4a3018f5
1 changed files with 2 additions and 2 deletions

4
bpm.c
View File

@ -182,7 +182,7 @@ int main(int argc, char *argv[])
float *nrg = NULL;
size_t len = 0, buf = 0;
off_t n = 0;
float bpm, v = 0.0;
double bpm, v = 0.0;
const char *format = "%0.1f";
FILE *fdiff = NULL, *fnrg = NULL;
@ -239,7 +239,7 @@ int main(int argc, char *argv[])
/* Maintain an energy meter (similar to PPM) */
z = fabs(z);
z = fabsf(z);
if (z > v) {
v += (z - v) / 8;
} else {