Exemple #1
0
        public static double[] ToDoubleArray(Obj obj)
        {
            if (obj.IsSeq())
            {
                double[] array = obj.GetDoubleArray();
                return(Array.Take(array, array.Length));
            }

            Obj[] elts = obj.GetObjArray();
            int   len  = elts.Length;

            double[] doubles = new double[len];
            for (int i = 0; i < len; i++)
            {
                doubles[i] = elts[i].GetDouble();
            }
            return(doubles);
        }