add suggensstions by @paulromano

run clang-format on all changed files
Update test results
This commit is contained in:
Olaf Schumann 2022-01-16 19:29:29 +00:00
parent 10dfbb81c8
commit 39e57619df
6 changed files with 13 additions and 19 deletions

View file

@ -244,16 +244,16 @@ double ContinuousTabular::sample(double E, uint64_t* seed) const
// Now interpolate between incident energy bins i and i + 1
if (!histogram_interp && n_energy_out > 1 && k >= n_discrete) {
// Interpolation for energy E1 and EK
int n_energy_out = distribution_[i].e_out.size();
int n_discrete = distribution_[i].n_discrete;
n_energy_out = distribution_[i].e_out.size();
n_discrete = distribution_[i].n_discrete;
const double E_i_1 = distribution_[i].e_out[n_discrete];
const double E_i_K = distribution_[i].e_out[n_energy_out - 1];
n_energy_out = distribution_[i + 1].e_out.size();
n_discrete = distribution_[i + 1].n_discrete;
const double E_i1_1 = distribution_[i + 1].e_out[n_discrete];
const double E_i1_K = distribution_[i + 1].e_out[n_energy_out - 1];
const double E_1 = E_i_1 + r * (E_i1_1 - E_i_1);
const double E_K = E_i_K + r * (E_i1_K - E_i_K);