C# use YogaSize throughout the measure call chain
Summary: Java still has the same problem (see #296) Also there is no need to have double in the method signature as we only use float internally, which could confuse some. Closes https://github.com/facebook/yoga/pull/300 Reviewed By: splhack Differential Revision: D4365993 Pulled By: emilsjolander fbshipit-source-id: 681f8b1725e63eddcfb9a6c756f2ae215a44425a
This commit is contained in:
committed by
Facebook Github Bot
parent
ab595d1875
commit
cd78291de5
@@ -11,24 +11,9 @@ namespace Facebook.Yoga
|
||||
{
|
||||
public class MeasureOutput
|
||||
{
|
||||
public static long Make(double width, double height)
|
||||
public static YogaSize Make(float width, float height)
|
||||
{
|
||||
return Make((int) width, (int) height);
|
||||
}
|
||||
|
||||
public static long Make(int width, int height)
|
||||
{
|
||||
return (long)(((ulong) width) << 32 | ((uint) height));
|
||||
}
|
||||
|
||||
public static int GetWidth(long measureOutput)
|
||||
{
|
||||
return (int) (0xFFFFFFFF & (measureOutput >> 32));
|
||||
}
|
||||
|
||||
public static int GetHeight(long measureOutput)
|
||||
{
|
||||
return (int) (0xFFFFFFFF & measureOutput);
|
||||
return new YogaSize { width = width, height = height};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user