A rotation quaternion, layout-compatible with what
GET_ENTITY_QUATERNION / SET_ENTITY_QUATERNION expect.
Most gameplay code should stay in Euler degrees (Entity.rotation), since
that's what the game itself exposes. Reach for quaternions when you need
interpolation that doesn't gimbal-lock — smooth camera swings, attached
object alignment, or blending between two orientations over time.
Euler conversions here use the game's ZXY convention (pitch = X,
roll = Y, yaw = Z), matching GET_ENTITY_ROTATION with rotation order 2.
Static variables
Static methods
staticinlineconjugate(this:QuaternionData):Quaternion
The inverse rotation (valid for unit quaternions, which is all this class produces).
staticfromAxisAngle(axis:Vector3, degrees:Float):Quaternion
Builds a rotation around axis (which is normalized first) by degrees.
staticfromEuler(rotation:Vector3):Quaternion
Builds a rotation from Euler angles in degrees (pitch, roll, yaw), ZXY order.
staticinlinefromHeading(degrees:Float):Quaternion
A yaw-only rotation matching a game heading in degrees.
staticmul(this:QuaternionData, rhs:Quaternion):Quaternion
Composes two rotations: a * b applies b first, then a.
staticslerp(this:QuaternionData, target:Quaternion, t:Float):Quaternion
Spherical interpolation towards target. Unlike lerping Euler angles,
this always takes the shortest arc and keeps a constant angular speed.