From 932104c55a88ad788a8ab43ac15bc5ac23b34f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 20 Jul 2019 11:07:46 +0200 Subject: Fix bug in sample selection (missing parentheses). --- src/sample_selection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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::max()); float down_value_lb = (up_index != 0 ? f_close*pow2(close_down) : std::numeric_limits::max()); -- cgit v1.2.3