ShaderTools.Hlsl.Symbols.TypeFacts.IsCast C# (CSharp) Method

IsCast() static private method

static private IsCast ( ScalarType left, ScalarType right ) : bool
left ScalarType
right ScalarType
return bool
        internal static bool IsCast(ScalarType left, ScalarType right)
        {
            if (left == right)
                return false;

            switch (left)
            {
                case ScalarType.Min12Int:
                case ScalarType.Min16Int:
                case ScalarType.Int:
                    switch (right)
                    {
                        case ScalarType.Min16Uint:
                        case ScalarType.Uint:
                            return false;
                    }
                    break;
                case ScalarType.Min16Uint:
                case ScalarType.Uint:
                    switch (right)
                    {
                        case ScalarType.Min12Int:
                        case ScalarType.Min16Int:
                        case ScalarType.Int:
                            return false;
                    }
                    break;
            }

            return true;
        }