Skip to content

Commit c1ca3b0

Browse files
authored
Round to pixel values after subtraction
1 parent f748523 commit c1ca3b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/YogaKit/YGLayout.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ static void YGApplyLayoutToViewHierarchy(UIView *view, BOOL preserveOrigin)
525525
.y = YGRoundPixelValue(topLeft.y + origin.y),
526526
},
527527
.size = {
528-
.width = MAX(0, YGRoundPixelValue(bottomRight.x) - YGRoundPixelValue(topLeft.x)),
529-
.height = MAX(0, YGRoundPixelValue(bottomRight.y) - YGRoundPixelValue(topLeft.y)),
528+
.width = MAX(0, YGRoundPixelValue(bottomRight.x - topLeft.x)),
529+
.height = MAX(0, YGRoundPixelValue(bottomRight.y - topLeft.y)),
530530
},
531531
};
532532

0 commit comments

Comments
 (0)