I have an array of Floats that need to be converted to a byte array and back to a float[]... can anyone help me do this correctly?
I\'m working with the bitConvert
You are not moving the position when you copy the float[i] into the byte array, you should write something like
Array.Copy(BitConverter.GetBytes(float[i]),0,res,i*4);
instead of just:
ret = BitConverter.GetBytes(floats[i]);
the inverse function follow the same strategy.