Function tf2SwapEndianFloat
Defined in File Scalar.hpp
Function Documentation
-
unsigned int tf2SwapEndianFloat(float d)
tf2SwapFloat uses using char pointers to swap the endianness
tf2SwapFloat/tf2SwapDouble will NOT return a float, because the machine might ‘correct’ invalid floating point values Not all values of sign/exponent/mantissa are valid floating point numbers according to IEEE 754. When a floating point unit is faced with an invalid value, it may actually change the value, or worse, throw an exception. In most systems, running user mode code, you wouldn’t get an exception, but instead the hardware/os/runtime will ‘fix’ the number for you. so instead of returning a float/double, we return integer/long long integer