UnityEditor.SplitView.RectFromEdge C# (CSharp) Method

RectFromEdge() private method

private RectFromEdge ( Rect rect, ViewEdge edge, float thickness, float offset ) : Rect
rect UnityEngine.Rect
edge ViewEdge
thickness float
offset float
return UnityEngine.Rect
        private Rect RectFromEdge(Rect rect, ViewEdge edge, float thickness, float offset)
        {
            switch (edge)
            {
                case ViewEdge.Left:
                    return new Rect(rect.x - offset, rect.y, thickness, rect.height);

                case ViewEdge.Bottom:
                    return new Rect(rect.x, (rect.yMax - thickness) + offset, rect.width, thickness);

                case ViewEdge.Top:
                    return new Rect(rect.x, rect.y - offset, rect.width, thickness);

                case ViewEdge.Right:
                    return new Rect((rect.xMax - thickness) + offset, rect.y, thickness, rect.height);
            }
            throw new ArgumentException("Specify exactly one edge");
        }