* @brief SP float bit-interpreted as an unsigned integer. * * @param v The value to bitcast. * * @return The converted value. */
| 381 | * @return The converted value. |
| 382 | */ |
| 383 | static inline unsigned int float_as_uint(float v) |
| 384 | { |
| 385 | // Future: Can use std:bit_cast with C++20 |
| 386 | unsigned int iv; |
| 387 | std::memcpy(&iv, &v, sizeof(float)); |
| 388 | return iv; |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * @brief Unsigned integer bit-interpreted as an SP float. |
no outgoing calls
no test coverage detected