UnityEditor.TickHandler.SetTickModulosForFrameRate C# (CSharp) Method

SetTickModulosForFrameRate() public method

public SetTickModulosForFrameRate ( float frameRate ) : void
frameRate float
return void
        public void SetTickModulosForFrameRate(float frameRate)
        {
            if (frameRate != Mathf.Round(frameRate))
            {
                float[] tickModulos = new float[] { 1f / frameRate, 5f / frameRate, 10f / frameRate, 50f / frameRate, 100f / frameRate, 500f / frameRate, 1000f / frameRate, 5000f / frameRate, 10000f / frameRate, 50000f / frameRate, 100000f / frameRate, 500000f / frameRate };
                this.SetTickModulos(tickModulos);
            }
            else
            {
                List<int> list = new List<int>();
                int item = 1;
                while (item < frameRate)
                {
                    if (item == frameRate)
                    {
                        break;
                    }
                    int num2 = Mathf.RoundToInt(frameRate / ((float) item));
                    if ((num2 % 60) == 0)
                    {
                        item *= 2;
                        list.Add(item);
                    }
                    else if ((num2 % 30) == 0)
                    {
                        item *= 3;
                        list.Add(item);
                    }
                    else if ((num2 % 20) == 0)
                    {
                        item *= 2;
                        list.Add(item);
                    }
                    else if ((num2 % 10) == 0)
                    {
                        item *= 2;
                        list.Add(item);
                    }
                    else if ((num2 % 5) == 0)
                    {
                        item *= 5;
                        list.Add(item);
                    }
                    else if ((num2 % 2) == 0)
                    {
                        item *= 2;
                        list.Add(item);
                    }
                    else if ((num2 % 3) == 0)
                    {
                        item *= 3;
                        list.Add(item);
                    }
                    else
                    {
                        item = Mathf.RoundToInt(frameRate);
                    }
                }
                float[] numArray = new float[9 + list.Count];
                for (int i = 0; i < list.Count; i++)
                {
                    numArray[i] = 1f / ((float) list[(list.Count - i) - 1]);
                }
                numArray[numArray.Length - 1] = 3600f;
                numArray[numArray.Length - 2] = 1800f;
                numArray[numArray.Length - 3] = 600f;
                numArray[numArray.Length - 4] = 300f;
                numArray[numArray.Length - 5] = 60f;
                numArray[numArray.Length - 6] = 30f;
                numArray[numArray.Length - 7] = 10f;
                numArray[numArray.Length - 8] = 5f;
                numArray[numArray.Length - 9] = 1f;
                this.SetTickModulos(numArray);
            }
        }