QuaternionToAxisAngle
function · cmath · unreached
- Address
0x7c0320· 138 bytes, up to0x7c03a9- Signature
void __thiscall (NTempest::C4Quaternion *this, float *angle, NTempest::C3Vector *axis)- Meaning
- Writes a quaternion's angle and axis
- Confidence
- verified, proof two
- Finding
- cmath/quaternions#axis-angle-and-conjugate
Finding: Axis angle and conjugate in cmath: quaternions
0x7c02c0(angle, axis) builds (sin(a/2)·axis, cos(a/2)) in ecx, the half angle rounded to a float
before fsincos. 0x7c0320(angleOut, axisOut) reads this as a quaternion: with x² + y² + z²
above 0 it writes the angle 2·acos(w) and the axis v/|v|, and otherwise the angle 0 and the axis
(1, 0, 0); w is not clamped. 0x7c03b0(out) writes the inverse (−x, −y, −z, w)/(x² + y² + z² + w²),
and the identity (0, 0, 0, 1) when that sum is below 2⁻²². 0x7c1340(out) writes the conjugate
(−x, −y, −z, w). None is called.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 1
- __CIacos crt
Calls and jumps by a bare address, from tables/calls.tsv.