Skip to content

Commit

Permalink
replace % with fmod
Browse files Browse the repository at this point in the history
  • Loading branch information
pdziekan committed Sep 10, 2024
1 parent ef5f356 commit 1582f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmpdata++/output/hdf5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1582f06

Please sign in to comment.