diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-24 22:48:41 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-24 22:48:41 +0200 |
commit | daff5222267fb6d13351c72b2d8fbfea836494a8 (patch) | |
tree | f4755ff4920b934ee64a8be595f2721e974921a3 /src | |
parent | 5b0a02a1bd8caad21caa7d000173270d31df4201 (diff) |
Stopped fixed point falling for Zeno's paradox
Diffstat (limited to 'src')
-rw-r--r-- | src/openvic-simulation/types/fixed_point/FixedPoint.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvic-simulation/types/fixed_point/FixedPoint.hpp b/src/openvic-simulation/types/fixed_point/FixedPoint.hpp index 913f237..efe92a6 100644 --- a/src/openvic-simulation/types/fixed_point/FixedPoint.hpp +++ b/src/openvic-simulation/types/fixed_point/FixedPoint.hpp @@ -571,7 +571,7 @@ namespace OpenVic { int64_t ret = 0; for (int i = PRECISION - 1; i >= 0; --i) { decimal >>= 1; - if (parsed_value > decimal) { + if (parsed_value >= decimal) { parsed_value -= decimal; ret |= 1 << i; } |