V2/Cet/IO/Cet.IO/ByteArray/ByteArrayHelpers.Convert.cs
/// <summary>
/// Write an <see cref="System.Single"/> to the given byte array
/// starting from the specified offset, 
/// and composed as the Little-endian format
/// </summary>
/// <param name="buffer">The source byte array</param>
/// <param name="offset">The index of the first byte to be considered</param>
/// <param name="value">The value to be written</param>
Write an  to the given byte array
starting from the specified offset,
and composed as the Little-endian format
Write an to the given byte array starting from the specified offset and composed as the Little - endian format
public static void Write1912LE(
            byte[] buffer,
            int offset,
            Single value)
        {
            int ivalue = (int)(value * 4096f);
            buffer[offset] = (byte)ivalue;
            buffer[offset + 1] = (byte)(ivalue >> 8);
            buffer[offset + 2] = (byte)(ivalue >> 16);
            buffer[offset + 3] = (byte)(ivalue >> 24);
        }
public static void Write1912LE ( byte [ ] buffer , int offset , Single value ) { int ivalue = ( int ) ( value * 4096f ) ; buffer [ offset ] = ( byte ) ivalue ; buffer [ offset + 1 ] = ( byte ) ( ivalue >> 8 ) ; buffer [ offset + 2 ] = ( byte ) ( ivalue >> 16 ) ; buffer [ offset + 3 ] = ( byte ) ( ivalue >> 24 ) ; }
Write an  to the given byte array
starting from the specified offset,
and composed as the Little-endian format
Write an to the given byte array starting from the specified offset and composed as the Little - endian format
buffer
byte[]
The source byte array
The source byte array
offset
int
The index of the first byte to be considered
The index of the first byte to be considered
value
Single
The value to be written
The value to be written