UnityEditor.LightingWindowObjectTab.ResizeRectToFit C# (CSharp) Method

ResizeRectToFit() private method

private ResizeRectToFit ( Rect rect, Rect to ) : Rect
rect UnityEngine.Rect
to UnityEngine.Rect
return UnityEngine.Rect
        private Rect ResizeRectToFit(Rect rect, Rect to)
        {
            float a = to.width / rect.width;
            float b = to.height / rect.height;
            float num3 = Mathf.Min(a, b);
            float width = (int) Mathf.Round(rect.width * num3);
            return new Rect(rect.x, rect.y, width, (int) Mathf.Round(rect.height * num3));
        }