UnityEditor.ZoomableArea.SetShownHRangeInsideMargins C# (CSharp) Method

SetShownHRangeInsideMargins() public method

public SetShownHRangeInsideMargins ( float min, float max ) : void
min float
max float
return void
        public void SetShownHRangeInsideMargins(float min, float max)
        {
            float num = (this.drawRect.width - this.leftmargin) - this.rightmargin;
            if (num < 0.1f)
            {
                num = 0.1f;
            }
            float num2 = max - min;
            if (num2 < 0.1f)
            {
                num2 = 0.1f;
            }
            this.m_Scale.x = num / num2;
            this.m_Translation.x = (-min * this.m_Scale.x) + this.leftmargin;
            this.EnforceScaleAndRange();
        }