summaryrefslogtreecommitdiff
path: root/src/sample_selection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sample_selection.cc')
-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());