benilla-re systems structs docs

NTempest::C4Quaternion

struct · cmath · 16 bytes

Meaning
Holds a quaternion: x, y and z, then the scalar w
Confidence
verified, proof one
Name from
a later build's public symbols
Finding
cmath/types#quaternions

Finding: Quaternions in cmath: value types

NTempest::C4Quaternion is four floats: the vector part x, y, z, then the scalar w. 0x7c0190 forms x = (m21 − m12)·k, the formula for a matrix acting on column vectors; its one caller, 0x7c0120, transposes the stored NTempest::C33Matrix first, so the pair gives x = (m12 − m21)·k of the row-vector matrix, and y and z alike.

The derivation is in the doc.

Fields 4

offsetsizetypenamemeaningconfidencefinding
0x00004floatm_xHolds x, the first component of the vector partverified, proof onecmath/types#quaternions
0x00044floatm_yHolds yverified, proof onecmath/types#quaternions
0x00084floatm_zHolds zverified, proof onecmath/types#quaternions
0x000c4floatm_wHolds w, the scalar part: the cosine of half the rotation angleverified, proof onecmath/types#quaternions