public GetFloat ( byte data, int index ) : float | ||
data | byte | |
index | int | |
return | float |
public override float GetFloat (byte [] data, int index)
{
if (data == null)
throw new ArgumentNullException ("data");
if (data.Length - index < 4)
throw new ArgumentException ("index");
if (index < 0)
throw new ArgumentException ("index");
float ret;
byte *b = (byte *)&ret;
for (int i = 0; i < 4; i++)
b [3-i] = data [index+i];
return ret;
}