inline DWORD FtoDW( FLOAT f ) { return *((DWORD*)&f); }
DWORD dwNumber = FtoDW(1.5);
What sort of accuracy is kept?
How does the comp go from DWORD to float like this? I can write the function but I do not understand how any accuracy or anything behind the decimal can be kept. 1.5 converted to a DWORD should be 1 or 2....




Reply With Quote