[YogaKit] rollback implementation of YGRoundPixelValue

This commit is contained in:
vvveiii
2020-08-14 17:51:47 +08:00
parent 520b622e5c
commit 7c940ac51f

View File

@@ -488,8 +488,7 @@ static void YGRemoveAllChildren(const YGNodeRef node) {
static CGFloat YGRoundPixelValue(CGFloat value) {
CGFloat scale = YGScaleFactor();
return ceil(value * scale) / scale; // Pixel-align
return round(value * scale) / scale;
}
static void YGApplyLayoutToViewHierarchy(UIView* view, BOOL preserveOrigin) {