Mercurial > hg > svcore
changeset 1087:dcf54a6964d0
Tidy
author | Chris Cannam |
---|---|
date | Thu, 11 Jun 2015 09:09:11 +0100 |
parents | 9f4505ac9072 |
children | 5fab8e4f5f19 |
files | data/model/test/MockWaveModel.cpp |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/data/model/test/MockWaveModel.cpp Wed Jun 10 17:06:02 2015 +0100 +++ b/data/model/test/MockWaveModel.cpp Thu Jun 11 09:09:11 2015 +0100 @@ -67,17 +67,17 @@ for (int i = 0; i < length; ++i) { - float v = 0.f; + double v = 0.0; switch (sort) { - case DC: v = 1.f; break; - case Sine: v = (float)sin((2.0 * M_PI / 8.0) * i); break; - case Cosine: v = (float)cos((2.0 * M_PI / 8.0) * i); break; + case DC: v = 1.0; break; + case Sine: v = sin((2.0 * M_PI / 8.0) * i); break; + case Cosine: v = cos((2.0 * M_PI / 8.0) * i); break; case Nyquist: v = (i % 2) * 2 - 1; break; - case Dirac: v = (i == 0) ? 1.f : 0.f; break; + case Dirac: v = (i == 0) ? 1.0 : 0.0; break; } - data.push_back(v); + data.push_back(float(v)); } return data;