diff --git a/ReactCommon/yoga/yoga/Yoga.cpp b/ReactCommon/yoga/yoga/Yoga.cpp index 8483dd88850828..016ab0ac6744fc 100644 --- a/ReactCommon/yoga/yoga/Yoga.cpp +++ b/ReactCommon/yoga/yoga/Yoga.cpp @@ -3650,7 +3650,7 @@ YOGA_EXPORT float YGRoundValueToPixelGrid( const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { - float scaledValue = value * pointScaleFactor; + double scaledValue = ((double) value) * pointScaleFactor; // We want to calculate `fractial` such that `floor(scaledValue) = scaledValue // - fractial`. float fractial = fmodf(scaledValue, 1.0f);