Convert int bits to float bits

Vexingly, if you were using double and long, there is BitConverter.DoubleToInt64Bits and BitConverter.Int64BitsToDouble. I have genuinely no idea why there aren’t Single / Int32 equivalents, as it forces you to create a pointless byte[] on the heap (it doesn’t even let you pass in a pre-existing buffer). If you are happy to use unsafe code, … Read more