From 1582f06cb594045078787159e5e8300ab2161664 Mon Sep 17 00:00:00 2001 From: Piotr Dziekan Date: Tue, 10 Sep 2024 15:09:24 +0200 Subject: [PATCH] replace % with fmod --- libmpdata++/output/hdf5.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdata++/output/hdf5.hpp b/libmpdata++/output/hdf5.hpp index 13672a7a..a890b45c 100644 --- a/libmpdata++/output/hdf5.hpp +++ b/libmpdata++/output/hdf5.hpp @@ -201,7 +201,7 @@ namespace libmpdataxx // incl. t=0 and t=outstart const hsize_t nt_out = ((nt - this->outstart) / this->outfreq + 1) * this->outwindow + (this->outstart == 0 ? 0 : 1) // for outstart>0 we still want to store t=0 - - std::max(0, this->outwindow - (nt % this->outfreq) - 1); // timsteps from outwindow that go beyond nt + - std::max(0, this->outwindow - int(std::fmod(nt, this->outfreq)) - 1); // timsteps from outwindow that go beyond nt float dt = this->dt;