I need to convert normalized integer values ββto and from real floating point values. For example, for int16_t, a value of 1.0 is represented by 32767, and -1.0 is represented by -32768. Although it is a little tedious to do this for every integer type, both signed and unsigned, it is still fairly easy to write manually.
However, I want to use standard methods when possible, instead of leaving and reinventing the wheel, so what I'm looking for looks like a standard C or C ++ header, Boost library, or some other small, easily included source that is already performs these conversions.
source
share