MCPcopy Create free account
hub / github.com/crownengine/crown / frexp

Function frexp

3rdparty/bx/src/math.cpp:13–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace bx
12{
13 float frexp(float _a, int32_t* _outExp)
14 {
15 const uint32_t ftob = floatToBits(_a);
16 const uint32_t masked0 = uint32_and(ftob, kFloatExponentMask);
17 const uint32_t exp0 = uint32_srl(masked0, kFloatExponentBitShift);
18
19 const uint32_t masked1 = uint32_and(ftob, kFloatSignMask | kFloatMantissaMask);
20 const uint32_t bits = uint32_or(masked1, UINT32_C(0x3f000000) );
21 const float result = bitsToFloat(bits);
22
23 *_outExp = int32_t(exp0 - 0x7e);
24
25 return result;
26 }
27
28 void mtxLookAt(float* _result, const Vec3& _eye, const Vec3& _at, const Vec3& _up, Handedness::Enum _handedness)
29 {

Callers 2

addConstantUnionMethod · 0.50
math_frexpFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected