FizVizController/FizVizController/Commands/FizVizCommand.cs
/// <summary>
/// Write a float into 8 bytes in the data array starting at offset
/// </summary>
/// <param name="data"></param>
/// <param name="value"></param>
/// <param name="offset"></param>
Write a float into 8 bytes in the data array starting at offset
Write a float into 8 bytes in the data array starting at offset
protected void WriteFloat(byte[] data, float value, uint offset)
        {
            byte[] floatBytes = BitConverter.GetBytes(value);
            for (uint i = 0; i < 4; i++)
            {
                WriteTwoBytes(data, (uint)floatBytes[i], offset + (i * 2));
            }
        }
protected void WriteFloat ( byte [ ] data , float value , uint offset ) { byte [ ] floatBytes = BitConverter . GetBytes ( value ) ; for ( uint i = 0 ; i < 4 ; i ++ ) { WriteTwoBytes ( data , ( uint ) floatBytes [ i ] , offset + ( i * 2 ) ) ; } }
Write a float into 8 bytes in the data array starting at offset
Write a float into 8 bytes in the data array starting at offset
data
byte[]
None
value
float
None
offset
uint
None