GlmSharp/GlmSharp5/Quat/uquat.cs
/// <summary>
/// Tries to convert the string representation of the quaternion into a quaternion representation (using a designated separator and a number style and a format provider), returns false if string was invalid.
/// </summary>
Tries to convert the string representation of the quaternion into a quaternion representation (using a designated separator and a number style and a format provider), returns false if string was invalid.
Tries to convert the string representation of the quaternion into a quaternion representation ( using a designated separator and a number style and a format provider ) returns false if string was invalid .
public static bool TryParse(string s, string sep, NumberStyles style, IFormatProvider provider, out uquat result)
        {
            result = Zero;
            if (string.IsNullOrEmpty(s)) return false;
            var kvp = s.Split(new[] { sep }, StringSplitOptions.None);
            if (kvp.Length != 4) return false;
            uint x = 0u, y = 0u, z = 0u, w = 0u;
            var ok = ((uint.TryParse(kvp[0].Trim(), style, provider, out x) && uint.TryParse(kvp[1].Trim(), style, provider, out y)) && (uint.TryParse(kvp[2].Trim(), style, provider, out z) && uint.TryParse(kvp[3].Trim(), style, provider, out w)));
            result = ok ? new uquat(x, y, z, w) : Zero;
            return ok;
        }
public static bool TryParse ( string s , string sep , NumberStyles style , IFormatProvider provider , out uquat result ) { result = Zero ; if ( string . IsNullOrEmpty ( s ) ) return false ; var kvp = s . Split ( new [ ] { sep } , StringSplitOptions . None ) ; if ( kvp . Length != 4 ) return false ; uint x = 0u , y = 0u , z = 0u , w = 0u ; var ok = ( ( uint . TryParse ( kvp [ 0 ] . Trim ( ) , style , provider , out x ) && uint . TryParse ( kvp [ 1 ] . Trim ( ) , style , provider , out y ) ) && ( uint . TryParse ( kvp [ 2 ] . Trim ( ) , style , provider , out z ) && uint . TryParse ( kvp [ 3 ] . Trim ( ) , style , provider , out w ) ) ) ; result = ok ? new uquat ( x , y , z , w ) : Zero ; return ok ; }
Tries to convert the string representation of the quaternion into a quaternion representation (using a designated separator and a number style and a format provider), returns false if string was invalid.
Tries to convert the string representation of the quaternion into a quaternion representation ( using a designated separator and a number style and a format provider ) returns false if string was invalid .
s
string
sep
string
style
NumberStyles
provider
IFormatProvider
uquat
out