From 7c940ac51f2fd729173e43616a281de14400c4af Mon Sep 17 00:00:00 2001 From: vvveiii Date: Fri, 14 Aug 2020 17:51:47 +0800 Subject: [PATCH] [YogaKit] rollback implementation of YGRoundPixelValue --- YogaKit/Source/YGLayout.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YGLayout.m index 36a77c34..1cec9575 100644 --- a/YogaKit/Source/YGLayout.m +++ b/YogaKit/Source/YGLayout.m @@ -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) {