Fix rounding for armour bases #1202
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #787
EDIT: Need to test out more, but some items seem to round down at 0.5, other up. In the linked build, Sol Stride comes to 220.5 and is 220 in game. Entropy Pace is 93.5 and 94 in game. In PoB, it shows 94 and 221, opposite behaviour of each other.
I tried taking the quality to the base first, then rounding it. But If we round normally, Entropy Pace and Sol Stride are both .5, which becomes an issue for final stat as said. If we round up, Entropy Pace becomes 95 ES. The Bound Boots also land on 178.5 with normal rounding before this PR. But our tooltip rounds that UP to 179, which is correct.
Floating point stuff, or maybe certain bases round differently for some reason?
https://maxroll.gg/poe2/pob/nen360qj
This has a handful of items with expected values for testing.
Description of the problem being solved:
Bases were being rounded, but it appears they are not. Haven't confirmed armour/evasion do the same, but assuming they are. Before PR the calcs come to 220.5, which would round to 221. On trade and in the issue linked the item was 220 ES.
After screenshot: