Closed Alexhuszagh closed 3 years ago
Makes total sense, I must have simply forgotten about from_bits()
methods while using C++ code as a reference (where you have to do everything manually).
I was a bit confused by v & 0xFFFFFFFF
for a moment for big-endian targets but I think it is correct indeed (as also shown in #19). For our peace of mind, we should probably have at least one BE target in the CI.
@aldanor It's unnecessary, but it's just for peace of mind. x as u32
will just take the lower 32-bits, which that bitmask does (which, at an decent optimization level, will always be a no-op).
Fixed #19.