SlerpQuaternions
function · cmath · unreached
- Address
0x7c0570· 328 bytes, up to0x7c06b7- Signature
NTempest::C4Quaternion * __fastcall (NTempest::C4Quaternion *out, const NTempest::C4Quaternion *a, float t, const NTempest::C4Quaternion *b)- Meaning
- Interpolates two quaternions spherically along the shorter arc
- Confidence
- verified, proof two
- Finding
- cmath/quaternions#slerp
Finding: Slerp in cmath: quaternions
0x7c0570(a, t, b) interpolates spherically between a (edx) and b ([ebp+0xc]) by t ([ebp+8]),
writing the result through ecx. The cosine d = a·b (accumulated z, y, x, w); when it is negative the
sign is −1 and d is negated. s = √|1 − d²|. When s is below 2⁻²¹ the result is a. Otherwise
θ = atan2(s, d) (fpatan), w0 = sin((1 − t)·θ)/s, w1 = sign·sin(t·θ)/s, and the result is
w0·a + w1·b, each component rounded to a float.
The derivation is in the doc.
Callers 1
- SquadBlend cmath
Callees 1
- SetVector4 gxumath
Calls and jumps by a bare address, from tables/calls.tsv.