From 19b77bfd3e67a6e3e2cd19801848a59ada697394 Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Tue, 22 Oct 2024 17:02:06 -0400 Subject: [PATCH] Use rounding for dispersers from cell Replaced flooring by rounding in computation of number of dispersers from a cell. --- include/pops/host_pool.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/pops/host_pool.hpp b/include/pops/host_pool.hpp index efedc488..ec7221d5 100644 --- a/include/pops/host_pool.hpp +++ b/include/pops/host_pool.hpp @@ -307,8 +307,7 @@ class HostPool : public HostPoolInterface } } else { - dispersers_from_cell = - static_cast(std::floor(lambda * infected_at(row, col))); + dispersers_from_cell = std::lround(lambda * infected_at(row, col)); } return dispersers_from_cell; }