internal static UInt32 SwapByteOrder(UInt32 value) { return ((value & 0xff000000) >> 24) | ((value & 0x00ff0000) >> 8) | ((value & 0x0000ff00) << 8) | ((value & 0x000000ff) << 24); }
// // Floating point // #if UNSAFE /// <summary> /// Writes a 32 bit floating point value /// </summary> public unsafe void Write(float source) { uint val = *((uint *)&source); #if BIGENDIAN val = NetUtility.SwapByteOrder(val); #endif Write(val); }