File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -3701,16 +3701,12 @@ YOGA_EXPORT float YGRoundValueToPixelGrid(
3701
3701
scaledValue = scaledValue - fractial + 1.0 ;
3702
3702
} else if (forceCeil) {
3703
3703
// Next we check if we need to use forced rounding
3704
- scaledValue = scaledValue - fractial + 1.0 ;
3704
+ scaledValue = ceil ( scaledValue) ;
3705
3705
} else if (forceFloor) {
3706
- scaledValue = scaledValue - fractial ;
3706
+ scaledValue = floor ( scaledValue) ;
3707
3707
} else {
3708
3708
// Finally we just round the value
3709
- scaledValue = scaledValue - fractial +
3710
- (!YGDoubleIsUndefined (fractial) &&
3711
- (fractial > 0.5 || YGDoubleEqual (fractial, 0.5 ))
3712
- ? 1.0
3713
- : 0.0 );
3709
+ scaledValue = round (scaledValue);
3714
3710
}
3715
3711
return (YGDoubleIsUndefined (scaledValue) ||
3716
3712
YGDoubleIsUndefined (pointScaleFactor))
You can’t perform that action at this time.
0 commit comments