Axiom.Math.Vector2.Parse C# (CSharp) Метод

Parse() публичный Метод

public Parse ( string s ) : Vector2
s string
Результат Vector2
		public Vector2 Parse( string s )
		{
			// the format is "Vector2(x, y)"
			if ( !s.StartsWith( "Vector2(" ) )
				throw new FormatException();

			string[] values = s.Substring( 8 ).TrimEnd( '}' ).Split( ',' );

			return new Vector2( Real.Parse( values[ 0 ], CultureInfo.InvariantCulture ),
							   Real.Parse( values[ 1 ], CultureInfo.InvariantCulture ) );
		}