Home > other >  A guidance on the implications of the type of pun
A guidance on the implications of the type of pun

Time:09-18

Recently in learning the game engine development, see the game engine development explained by type of pun on size to transform the way:
 union intWithFloat {
Int32_t m_i32;
Float m_f32; }
{float swapFloat32 (float value)
IntWithFloat I;
I.m _i32=value;
I.m _f32=swapInt32 (i.m _i32)
Return i.m _f32; }

Small white building Lord, don't understand why this is so complicated that constructing a conversion function to convert float32 why not, using type pun here==what's the meaning?
  • Related