UnityEditor.SpriteEditorWindow.HandleBorderScaleSlider C# (CSharp) Method

HandleBorderScaleSlider() private method

private HandleBorderScaleSlider ( float x, float y, float width, float height, bool isHorizontal ) : float
x float
y float
width float
height float
isHorizontal bool
return float
        private float HandleBorderScaleSlider(float x, float y, float width, float height, bool isHorizontal)
        {
            float num2;
            float fixedWidth = SpriteUtilityWindow.s_Styles.dragBorderdot.fixedWidth;
            Vector2 pos = Handles.matrix.MultiplyPoint((Vector3) new Vector2(x, y));
            EditorGUI.BeginChangeCheck();
            if (isHorizontal)
            {
                Rect cursorRect = new Rect(pos.x - (fixedWidth * 0.5f), pos.y, fixedWidth, height);
                num2 = SpriteEditorHandles.ScaleSlider(pos, MouseCursor.ResizeHorizontal, cursorRect).x;
            }
            else
            {
                Rect rect2 = new Rect(pos.x, pos.y - (fixedWidth * 0.5f), width, fixedWidth);
                num2 = SpriteEditorHandles.ScaleSlider(pos, MouseCursor.ResizeVertical, rect2).y;
            }
            if (EditorGUI.EndChangeCheck())
            {
                return num2;
            }
            return (!isHorizontal ? y : x);
        }