Avro.BinaryEncoder.floatToRawIntBits C# (CSharp) Method

floatToRawIntBits() public static method

public static floatToRawIntBits ( float f ) : int
f float
return int
        public static int floatToRawIntBits(float f)
        {
            byte[] buffer = BitConverter.GetBytes(f);
            Array.Reverse(buffer);
            int value = BitConverter.ToInt32(buffer, 0);
            return value; // System.Net.IPAddress.NetworkToHostOrder(value);

            //BitMem bitMem = new BitMem();
            //bitMem.f = f;
            //return bitMem.i;
        }