Пример #1
0
        internal static double SwappableToDouble(byte[] value, int startIndex)
        {
            if (SwappedWordsInDouble)
            {
                Check(value, startIndex, 8);
                ByteArray arr = ByteArrayFactory.Create(IsLittleEndian);
                arr.WriteByte(value[startIndex + 4]);
                arr.WriteByte(value[startIndex + 5]);
                arr.WriteByte(value[startIndex + 6]);
                arr.WriteByte(value[startIndex + 7]);
                arr.WriteByte(value[startIndex + 0]);
                arr.WriteByte(value[startIndex + 1]);
                arr.WriteByte(value[startIndex + 2]);
                arr.WriteByte(value[startIndex + 3]);
                arr.position = 0;
                return(arr.ReadDouble());
            }

            return(ToDouble(value, startIndex));
        }