Revert D13866122: Fix negative value rounding issue for nodes across an axis
Differential Revision: D13866122 (4266409934
) Original commit changeset: 4faf8a9efc86 Original Phabricator Diff: D13866122 (4266409934
) fbshipit-source-id: c11919fdd585f09b0422e8db55a8a3d66027676f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4266409934
commit
996267dbcb
@@ -3701,12 +3701,16 @@ YOGA_EXPORT float YGRoundValueToPixelGrid(
|
||||
scaledValue = scaledValue - fractial + 1.0;
|
||||
} else if (forceCeil) {
|
||||
// Next we check if we need to use forced rounding
|
||||
scaledValue = ceil(scaledValue);
|
||||
scaledValue = scaledValue - fractial + 1.0;
|
||||
} else if (forceFloor) {
|
||||
scaledValue = floor(scaledValue);
|
||||
scaledValue = scaledValue - fractial;
|
||||
} else {
|
||||
// Finally we just round the value
|
||||
scaledValue = round(scaledValue);
|
||||
scaledValue = scaledValue - fractial +
|
||||
(!YGDoubleIsUndefined(fractial) &&
|
||||
(fractial > 0.5 || YGDoubleEqual(fractial, 0.5))
|
||||
? 1.0
|
||||
: 0.0);
|
||||
}
|
||||
return (YGDoubleIsUndefined(scaledValue) ||
|
||||
YGDoubleIsUndefined(pointScaleFactor))
|
||||
|
Reference in New Issue
Block a user