MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / uint_as_int

Function uint_as_int

Source/astcenc_mathlib.h:428–434  ·  view source on GitHub ↗

* @brief Unsigned integer bit-interpreted as a signed integer. * * @param v The value to bitcast. * * @return The converted value. */

Source from the content-addressed store, hash-verified

426 * @return The converted value.
427 */
428static inline int uint_as_int(unsigned int v)
429{
430 // Future: Can use std:bit_cast with C++20
431 int sv;
432 std::memcpy(&sv, &v, sizeof(unsigned int));
433 return sv;
434}
435
436/**
437 * @brief Fast approximation of 1.0 / sqrt(val).

Callers 1

safe_signed_lshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected