QuaternionExp
function · cmath · unreached
- Address
0x7c0450· 160 bytes, up to0x7c04ef- Signature
NTempest::C4Quaternion * __thiscall (NTempest::C4Quaternion *this, NTempest::C4Quaternion *out)- Meaning
- Writes the quaternion exponential of a rotation vector
- Confidence
- verified, proof two
- Finding
- cmath/quaternions#exponential-and-logarithm
Finding: Exponential and logarithm in cmath: quaternions
0x7c0450(out) maps a rotation vector v = (x, y, z) (the first three floats of this) to the
quaternion (k·v, cos θ) with θ = |v| and k = sin θ/θ; when |sin θ| is below 2⁻²¹ (0x81d9a0)
it writes (v, cos θ) unchanged. 0x7c04f0(out) is the logarithm: for |w| strictly below 1 it
writes ((θ/sin θ)·v, 0) with θ = acos(w), and when |sin θ| is below 2⁻²¹, or |w| is 1 or more or NaN,
it writes (v, 0). The multiplication in the exponential uses k unrounded for the z component and
rounded for x and y.
The derivation is in the doc.
Callers 3
- SquadControlPoints cmath
- SquadControlPoint cmath
- EvaluateSquadSegment cmath
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.