BBGamelib.ccUtils.PointFromString C# (CSharp) Method

PointFromString() public static method

public static PointFromString ( string s ) : Vector2
s string
return Vector2
		public static Vector2 PointFromString(string s){
			s = s.Trim ();
			s = s.Substring (1, s.Length - 2);
			string[] ss = s.Split(',');
			if (ss.Length < 2) {
				return new Vector2 ();		
			} else {
				float x = float.Parse(ss[0]);
				float y = float.Parse(ss[1]);
				return new Vector2(x, y);
			}
		}