Ejemplo n.º 1
0
        private object ToVector2(string s)
        {
            if (TryConvert(s, out Expression expression) == false)
            {
                return(Failure);
            }

            var vector = EvaluationHelper.AsVector2(null, expression, null);

            if (vector == null)
            {
                return(Failure);
            }

            return(vector.Value);
        }
Ejemplo n.º 2
0
        Object ToVector2(String s)
        {
            Evaluation.Expression expression;
            if (TryConvert <Evaluation.Expression>(s, out expression) == false)
            {
                return(Failure);
            }

            Vector2?vector = EvaluationHelper.AsVector2(null, expression, null);

            if (vector == null)
            {
                return(Failure);
            }

            return(vector.Value);
        }