Floating precision error causing oversized layout main dimension (totalFlexShrinkScaledFactors) #1783
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are cases where subtraction from totalFlexShrinkScaledFactors causes the value to apporach zero but not quite reach it,
flexLine.layout.totalFlexShrinkScaledFactors == 0
should instead be <= 0.001Happens only under extreme conditions (resizing panels to 0 width)
49ee855f99/yoga/algorithm/CalculateLayout.cpp (L659)
We have
yoga::inexactEquals
that we could use for this. The way it works is a bit of a sledge hammer, but it's the right overall check here if we can accumulate FP error.