Skip to content

Commit 03bf7f8

Browse files
committed
Don't do truncation to integers
1 parent 97e1a63 commit 03bf7f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/YogaKit/YGLayout.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ - (void)set##objc_capitalized_name:(YGValue)objc_lowercased_name
116116

117117
YGValue YGPointValue(CGFloat value)
118118
{
119-
return (YGValue) { .value = (YGUnit) value, .unit = (YGUnit) YGUnitPoint };
119+
return (YGValue) { .value = (float) value, .unit = (YGUnit) YGUnitPoint };
120120
}
121121

122122
YGValue YGPercentValue(CGFloat value)
123123
{
124-
return (YGValue) { .value = (YGUnit) value, .unit = YGUnitPercent };
124+
return (YGValue) { .value = (float) value, .unit = YGUnitPercent };
125125
}
126126

127127
static YGConfigRef globalConfig;

0 commit comments

Comments
 (0)