exAtlasInfo.CompareByHeightRotate C# (CSharp) Метод

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

public static CompareByHeightRotate ( Element, _a, Element, _b ) : int
_a Element,
_b Element,
Результат int
    public static int CompareByHeightRotate( Element _a, Element _b )
    {
        int a_size = (int)_a.trimRect.height;
        if ( (int)_a.trimRect.width > (int)_a.trimRect.height ) {
            a_size = (int)_a.trimRect.width;
            _a.rotated = true;
        }
        int b_size = (int)_b.trimRect.height;
        if ( (int)_b.trimRect.width > (int)_b.trimRect.height ) {
            b_size = (int)_b.trimRect.width;
            _b.rotated = true;
        }
        int ret = a_size - b_size;
        if ( ret == 0 ) {
            ret = string.Compare( exEditorHelper.AssetToGUID(_a.texture), exEditorHelper.AssetToGUID(_b.texture) );
        }
        if ( _a.isFontElement && _b.isFontElement && ret == 0 ) {
            ret = _a.charInfo.id - _b.charInfo.id;
        }
        return ret;
    }