Beispiel #1
0
        private static Array_float TraverseRawFloatArray(XmlNode node, MetaBuilder mb)
        {
            var data = new List <float>();

            if (node.InnerText != "")
            {
                var split = Regex.Split(node.InnerText, @"[\s\r\n\t]");

                for (int i = 0; i < split.Length; i++)
                {
                    if (!string.IsNullOrEmpty(split[i]))
                    {
                        var val = Convert.ToSingle(split[i]);
                        data.Add(val);
                    }
                }
            }

            return(mb.AddFloatArrayPtr(data.ToArray()));
        }