From 5c617a59474abdd065fdcce84ff180381a3edb45 Mon Sep 17 00:00:00 2001 From: Richard Ross Date: Wed, 1 Nov 2017 16:26:57 -0700 Subject: [PATCH] Mirror AsyncExecutor, yoga, and nanosvg to fbcode. Summary: We'll need these libraries for rainbow, and none of them exist in fbcode. Reviewed By: mzlee Differential Revision: D5897801 fbshipit-source-id: c379b76fef2ab204555ceded0834efc6ba932f90 --- yoga/Yoga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yoga/Yoga.c b/yoga/Yoga.c index 45b37b9d..9486724b 100644 --- a/yoga/Yoga.c +++ b/yoga/Yoga.c @@ -3322,7 +3322,7 @@ float YGRoundValueToPixelGrid(const float value, scaledValue = scaledValue - fractial; } else { // Finally we just round the value - scaledValue = scaledValue - fractial + (fractial > 0.5f || YGFloatsEqual(fractial, 0.5f) ? 1.0f : 0.0f); + scaledValue = scaledValue - fractial + (fractial >= 0.5f ? 1.0f : 0.0f); } return scaledValue / pointScaleFactor; }