diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-04-01 13:05:40 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-04-01 13:05:40 +0200 |
commit | 982d6c8cd5ba6ade04683e5699fc9fc170e4c109 (patch) | |
tree | 5387fc190042e57fd319aa4cb03907013c1e0c09 /asset-sources | |
parent | ed0200a14a6bc54c25b2a82fd2fc9ed62f04ac94 (diff) | |
download | fietsboek-982d6c8cd5ba6ade04683e5699fc9fc170e4c109.tar.gz fietsboek-982d6c8cd5ba6ade04683e5699fc9fc170e4c109.tar.bz2 fietsboek-982d6c8cd5ba6ade04683e5699fc9fc170e4c109.zip |
fix round_to_multiple for second-level accuracy
It was ovious that this is broken when you try to round "0s" to
second-level granularity, and you end up with "1s". The problem comes
from the fact that we use the integer divison when checking whether we
should round up or down, but then also use strict inequality.
To fix this, we now also round down if the second_offset is equal to the
halfway point (which in the case of second-level granularity is 0).
Diffstat (limited to 'asset-sources')
0 files changed, 0 insertions, 0 deletions