ShaderInterpreter.Converter.ConvertFloatToDouble C# (CSharp) Method

ConvertFloatToDouble() private static method

Converts the float type to double type
private static ConvertFloatToDouble ( string _Source ) : string
_Source string
return string
        private static string ConvertFloatToDouble( string _Source )
        {
            int	CurrentPosition = 0;
            while( true )
            {
                int	FloatIndex = _Source.IndexOf( "float ", CurrentPosition, StringComparison.InvariantCultureIgnoreCase );
                if ( FloatIndex == -1 )
                    FloatIndex = _Source.IndexOf( "float	", CurrentPosition, StringComparison.InvariantCultureIgnoreCase );
                if ( FloatIndex == -1 )
                    FloatIndex = _Source.IndexOf( "float(", CurrentPosition, StringComparison.InvariantCultureIgnoreCase );
                if ( FloatIndex == -1 )
                    break;

                _Source = _Source.Remove( FloatIndex, "float".Length );
                _Source = _Source.Insert( FloatIndex, "double" );
            }

            return _Source;
        }