GlmSharp/GlmSharp5/Vec5/bvec5.cs
/// <summary>
/// Tries to convert the string representation of the vector into a vector representation (using a designated separator), returns false if string was invalid.
/// </summary>
Tries to convert the string representation of the vector into a vector representation (using a designated separator), returns false if string was invalid.
Tries to convert the string representation of the vector into a vector representation ( using a designated separator ) returns false if string was invalid .
public static bool TryParse(string s, string sep, out bvec5 result)
        {
            result = Zero;
            if (string.IsNullOrEmpty(s)) return false;
            var kvp = s.Split(new[] { sep }, StringSplitOptions.None);
            if (kvp.Length != 5) return false;
            bool x = false, y = false, z = false, w = false, v = false;
            var ok = (((bool.TryParse(kvp[0].Trim(), out x) && bool.TryParse(kvp[1].Trim(), out y)) && bool.TryParse(kvp[2].Trim(), out z)) && (bool.TryParse(kvp[3].Trim(), out w) && bool.TryParse(kvp[4].Trim(), out v)));
            result = ok ? new bvec5(x, y, z, w, v) : Zero;
            return ok;
        }
public static bool TryParse ( string s , string sep , out bvec5 result ) { result = Zero ; if ( string . IsNullOrEmpty ( s ) ) return false ; var kvp = s . Split ( new [ ] { sep } , StringSplitOptions . None ) ; if ( kvp . Length != 5 ) return false ; bool x = false , y = false , z = false , w = false , v = false ; var ok = ( ( ( bool . TryParse ( kvp [ 0 ] . Trim ( ) , out x ) && bool . TryParse ( kvp [ 1 ] . Trim ( ) , out y ) ) && bool . TryParse ( kvp [ 2 ] . Trim ( ) , out z ) ) && ( bool . TryParse ( kvp [ 3 ] . Trim ( ) , out w ) && bool . TryParse ( kvp [ 4 ] . Trim ( ) , out v ) ) ) ; result = ok ? new bvec5 ( x , y , z , w , v ) : Zero ; return ok ; }
Tries to convert the string representation of the vector into a vector representation (using a designated separator), returns false if string was invalid.
Tries to convert the string representation of the vector into a vector representation ( using a designated separator ) returns false if string was invalid .
s
string
sep
string
bvec5
out