cull(engine-cleanup): pass-9 cascade round 1 after UIPanel stub
This commit is contained in:
@@ -133,44 +133,6 @@ public static class NGUIMath
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Vector2 ConstrainRect(Vector2 minRect, Vector2 maxRect, Vector2 minArea, Vector2 maxArea)
|
||||
{
|
||||
Vector2 zero = Vector2.zero;
|
||||
float num = maxRect.x - minRect.x;
|
||||
float num2 = maxRect.y - minRect.y;
|
||||
float num3 = maxArea.x - minArea.x;
|
||||
float num4 = maxArea.y - minArea.y;
|
||||
if (num > num3)
|
||||
{
|
||||
float num5 = num - num3;
|
||||
minArea.x -= num5;
|
||||
maxArea.x += num5;
|
||||
}
|
||||
if (num2 > num4)
|
||||
{
|
||||
float num6 = num2 - num4;
|
||||
minArea.y -= num6;
|
||||
maxArea.y += num6;
|
||||
}
|
||||
if (minRect.x < minArea.x)
|
||||
{
|
||||
zero.x += minArea.x - minRect.x;
|
||||
}
|
||||
if (maxRect.x > maxArea.x)
|
||||
{
|
||||
zero.x -= maxRect.x - maxArea.x;
|
||||
}
|
||||
if (minRect.y < minArea.y)
|
||||
{
|
||||
zero.y += minArea.y - minRect.y;
|
||||
}
|
||||
if (maxRect.y > maxArea.y)
|
||||
{
|
||||
zero.y -= maxRect.y - maxArea.y;
|
||||
}
|
||||
return zero;
|
||||
}
|
||||
|
||||
public static Bounds CalculateAbsoluteWidgetBounds(Transform trans)
|
||||
{
|
||||
if (trans != null)
|
||||
|
||||
Reference in New Issue
Block a user