PathOfBuilding-PoE2 icon indicating copy to clipboard operation
PathOfBuilding-PoE2 copied to clipboard

Fix rounding for armour bases

Open Blitz54 opened this issue 3 months ago • 0 comments

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:

image

Blitz54 avatar Aug 27 '25 09:08 Blitz54