Created
June 24, 2014 12:53
-
-
Save jhorneman/b64c92f8d781555be7b9 to your computer and use it in GitHub Desktop.
rawBytesToFloat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float rawBytesToFloat(char* _buffer) | |
{ | |
unsigned int rawValue = asio::detail::socket_ops::network_to_host_long(*((unsigned int*) (_buffer))); | |
return *(reinterpret_cast<float*>(&rawValue)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment