Пример #1
0
        } // Read

        public static unsafe uint Read(this NativeReader reader, uint offset, out SingleCollection values)
        {
            values = new SingleCollection(reader, offset);
            uint count;

            offset = reader.DecodeUnsigned(offset, out count);
            offset = checked (offset + count * sizeof(Single));
            return(offset);
        } // Read
Пример #2
0
        public static float[] ToArray(this SingleCollection collection)
        {
            int count = collection.Count;

            float[] result = new float[count];
            int     i      = 0;

            foreach (float element in collection)
            {
                result[i++] = element;
            }
            Debug.Assert(i == count);
            return(result);
        }
Пример #3
0
        } // Read

        public static unsafe uint Read(this NativeReader reader, uint offset, out SingleCollection values)
        {
            values = new SingleCollection(reader, offset);
            uint count;
            offset = reader.DecodeUnsigned(offset, out count);
            offset = checked(offset + count * sizeof(Single));
            return offset;
        } // Read