MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / int_as_float

Function int_as_float

external/astc-encoder/Source/astcenc_mathlib.h:374–379  ·  view source on GitHub ↗

* @brief Integer bit-interpreted as an SP float. * * @param v The value to bitcast. * * @return The converted value. */

Source from the content-addressed store, hash-verified

372 * @return The converted value.
373 */
374static inline float int_as_float(int v)
375{
376 union { int a; float b; } u;
377 u.a = v;
378 return u.b;
379}
380
381/**
382 * @brief Fast approximation of 1.0 / sqrt(val).

Callers 5

change_signFunction · 0.70
exp2Function · 0.70
log2Function · 0.70
two_to_the_nFunction · 0.70
frexpFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected