* @brief Integer bit-interpreted as an SP float. * * @param v The value to bitcast. * * @return The converted value. */
| 366 | * @return The converted value. |
| 367 | */ |
| 368 | static inline float int_as_float(int v) |
| 369 | { |
| 370 | // Future: Can use std:bit_cast with C++20 |
| 371 | float fv; |
| 372 | std::memcpy(&fv, &v, sizeof(int)); |
| 373 | return fv; |
| 374 | } |
| 375 | |
| 376 | /** |
| 377 | * @brief SP float bit-interpreted as an unsigned integer. |
no outgoing calls
no test coverage detected