I don’t think I’ve ever used union for anything, but today I came across a very interesting use case to avoid bit-shifting tricks when dealing with data embedded in numbers. What’s a union? Microsoft defines it this way A union is a user-defined type in which all members share the same memory location. This definition means that […]