AlphaTab.Model.ModelUtils.GetIndex C# (CSharp) Метод

GetIndex() публичный статический Метод

public static GetIndex ( this duration ) : int
duration this
Результат int
        public static int GetIndex(this Duration duration)
        {
            var index = 0;
            var value = (int) duration;
            if (value < 0)
            {
                return index;
            }
            while ((value = (value >> 1)) > 0)
            {
                index++;
            }
            return index;
        }