I have a double in the range (0,1)
which I want to scale to the full range of a 32-bit unsigned int (0,0xFFFFFFFF)
.
How can I do this in C++? I am not concerned about the edge cases, so long as there isn't any nasty overflows where the result wraps around.
Thanks