UnityEditor.ZoomableArea.SetShownVRangeInsideMargins C# (CSharp) Method

SetShownVRangeInsideMargins() public method

public SetShownVRangeInsideMargins ( float min, float max ) : void
min float
max float
return void
        public void SetShownVRangeInsideMargins(float min, float max)
        {
            if (this.m_UpDirection == YDirection.Positive)
            {
                this.m_Scale.y = -((this.drawRect.height - this.topmargin) - this.bottommargin) / (max - min);
                this.m_Translation.y = (this.drawRect.height - (min * this.m_Scale.y)) - this.topmargin;
            }
            else
            {
                this.m_Scale.y = ((this.drawRect.height - this.topmargin) - this.bottommargin) / (max - min);
                this.m_Translation.y = (-min * this.m_Scale.y) - this.bottommargin;
            }
            this.EnforceScaleAndRange();
        }