summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2019-07-20 11:07:46 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2019-07-20 12:19:22 +0200
commit932104c55a88ad788a8ab43ac15bc5ac23b34f34 (patch)
tree8bf69e241b63f1df63651b95c2edc356d752137f /src
parent9b6fea43f0c77660e11b5c41fe0b63b2030867d9 (diff)
Fix bug in sample selection (missing parentheses).
Diffstat (limited to 'src')
-rw-r--r--src/sample_selection.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sample_selection.cc b/src/sample_selection.cc
index f675044..f991e4b 100644
--- a/src/sample_selection.cc
+++ b/src/sample_selection.cc
@@ -83,7 +83,7 @@ const Sample* SampleSelection::get(level_t level, std::size_t pos)
std::size_t down_index = (up_index == 0 ? 0 : up_index - 1);
auto const close_up = (samples[up_index].power-level)/power_range;
- auto const close_down = samples[down_index].power-level/power_range;
+ auto const close_down = (samples[down_index].power-level)/power_range;
float up_value_lb = (up_index < samples.size() ? f_close*pow2(close_up) : std::numeric_limits<float>::max());
float down_value_lb = (up_index != 0 ? f_close*pow2(close_down) : std::numeric_limits<float>::max());