UnityEditor.Tools.GetRectFromBoundsForAxis C# (CSharp) Method

GetRectFromBoundsForAxis() private static method

private static GetRectFromBoundsForAxis ( Bounds bounds, int axis ) : Rect
bounds UnityEngine.Bounds
axis int
return UnityEngine.Rect
        private static Rect GetRectFromBoundsForAxis(Bounds bounds, int axis)
        {
            switch (axis)
            {
                case 0:
                    return new Rect(-bounds.max.z, bounds.min.y, bounds.size.z, bounds.size.y);

                case 1:
                    return new Rect(bounds.min.x, -bounds.max.z, bounds.size.x, bounds.size.z);
            }
            return new Rect(bounds.min.x, bounds.min.y, bounds.size.x, bounds.size.y);
        }