* @brief SP float bit-interpreted as an integer. * * @param v The value to bitcast. * * @return The converted value. */
| 351 | * @return The converted value. |
| 352 | */ |
| 353 | static inline int float_as_int(float v) |
| 354 | { |
| 355 | // Future: Can use std:bit_cast with C++20 |
| 356 | int iv; |
| 357 | std::memcpy(&iv, &v, sizeof(float)); |
| 358 | return iv; |
| 359 | } |
| 360 | |
| 361 | /** |
| 362 | * @brief Integer bit-interpreted as an SP float. |
no outgoing calls
no test coverage detected