Skip to content

Commit

Permalink
Use rounding for dispersers from cell (#223)
Browse files Browse the repository at this point in the history
Replaced flooring by rounding in computation of number of dispersers from a cell.
  • Loading branch information
wenzeslaus authored Dec 18, 2024
1 parent 1d3ff98 commit 9345ef1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/pops/host_pool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ class HostPool : public HostPoolInterface<RasterIndex>
}
}
else {
dispersers_from_cell =
static_cast<int>(std::floor(lambda * infected_at(row, col)));
dispersers_from_cell = std::lround(lambda * infected_at(row, col));
}
return dispersers_from_cell;
}
Expand Down

0 comments on commit 9345ef1

Please sign in to comment.