Fix rounding of negative numbers #825
Reference in New Issue
Block a user
No description provided.
Delete Branch "rigdern/round-negative"
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?
YGRoundValueToPixelGrid
currently rounds negative numbers incorrectly. For example:However, that operation is supposed to take the floor of the number so the result should acutally be
-3.0
.There's a detailed comment in
YGRoundValueToPixelGrid
about the fix and why it works.A symptom that manifested because of this bug is that text nodes could get smaller and smaller on each layout pass. For details see https://github.com/facebook/yoga/issues/824.
Fixes #824
Adam Comella
Microsoft Corp.
shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Pull request closed