From c6f4aff4ef183046472497d59f0f8a79f95942e9 Mon Sep 17 00:00:00 2001 From: rcancro <@pinterest.com> Date: Thu, 17 Dec 2015 15:20:40 -0800 Subject: [PATCH] Do not round when resolving relative dimensions When laying out a node I got to a point where the constrained width was min 132.22222pts and max width was 100%. When resolving the relative size to pts it rounded to 132pt. This caused an assert in ASSizeRangeMake because the min width (132.222pt) was bigger than the max width (132pt) --- AsyncDisplayKit/Layout/ASDimension.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Layout/ASDimension.mm b/AsyncDisplayKit/Layout/ASDimension.mm index a0737f6682..a1e42c4b76 100644 --- a/AsyncDisplayKit/Layout/ASDimension.mm +++ b/AsyncDisplayKit/Layout/ASDimension.mm @@ -57,7 +57,7 @@ CGFloat ASRelativeDimensionResolve(ASRelativeDimension dimension, CGFloat parent case ASRelativeDimensionTypePoints: return dimension.value; case ASRelativeDimensionTypePercent: - return round(dimension.value * parent); + return dimension.value * parent; } }