Voronoi.Algorithms.FortuneHelpers.Vector.Vector C# (CSharp) Method

Vector() public method

Build a new vector from a string
public Vector ( string S ) : System
S string A string, as produced by ToString
return System
        public Vector(string S)
        {
            if(S[0]!='(' || S[S.Length-1]!=')')
                throw new Exception("Formatfehler!");
            string[] P = MathTools.HighLevelSplit(S.Substring(1,S.Length-2),';');
            data = new double[P.Length];
            int i;
            for(i=0;i<data.Length;i++)
            {
                data[i] = Convert.ToDouble(P[i]);
            }
        }

Same methods

Vector::Vector ( ) : System
Vector::Vector ( Vector O ) : System
Vector::Vector ( int dim ) : System