* @brief Unsigned integer bit-interpreted as an SP float. * * @param v The value to bitcast. * * @return The converted value. */
| 396 | * @return The converted value. |
| 397 | */ |
| 398 | static inline float uint_as_float(unsigned int v) |
| 399 | { |
| 400 | // Future: Can use std:bit_cast with C++20 |
| 401 | float fv; |
| 402 | std::memcpy(&fv, &v, sizeof(unsigned int)); |
| 403 | return fv; |
| 404 | } |
| 405 | |
| 406 | /** |
| 407 | * @brief Signed int bit-interpreted as an unsigned integer. |
no outgoing calls
no test coverage detected