UnityEditor.VerticalGrid.IsVisibleInScrollView C# (CSharp) Method

IsVisibleInScrollView() public method

public IsVisibleInScrollView ( float scrollViewHeight, float scrollPos, float gridStartY, int maxIndex, int &startIndex, int &endIndex ) : bool
scrollViewHeight float
scrollPos float
gridStartY float
maxIndex int
startIndex int
endIndex int
return bool
        public bool IsVisibleInScrollView(float scrollViewHeight, float scrollPos, float gridStartY, int maxIndex, out int startIndex, out int endIndex)
        {
            startIndex = endIndex = 0;
            float num = scrollPos;
            float num2 = scrollPos + scrollViewHeight;
            float num3 = gridStartY + this.topMargin;
            if (num3 > num2)
            {
                return false;
            }
            if ((num3 + this.height) < num)
            {
                return false;
            }
            float num4 = this.itemSize.y + this.verticalSpacing;
            int num5 = Mathf.FloorToInt((num - num3) / num4);
            startIndex = num5 * this.columns;
            startIndex = Mathf.Clamp(startIndex, 0, maxIndex);
            int num6 = Mathf.FloorToInt((num2 - num3) / num4);
            endIndex = ((num6 + 1) * this.columns) - 1;
            endIndex = Mathf.Clamp(endIndex, 0, maxIndex);
            return true;
        }