UnityEditor.GradientEditor.SwatchSort C# (CSharp) Method

SwatchSort() private method

private SwatchSort ( Swatch lhs, Swatch rhs ) : int
lhs Swatch
rhs Swatch
return int
        private int SwatchSort(Swatch lhs, Swatch rhs)
        {
            if ((lhs.m_Time == rhs.m_Time) && (lhs == this.m_SelectedSwatch))
            {
                return -1;
            }
            if ((lhs.m_Time == rhs.m_Time) && (rhs == this.m_SelectedSwatch))
            {
                return 1;
            }
            return lhs.m_Time.CompareTo(rhs.m_Time);
        }