Skip to content

five-on-it / packages/shared/src/math / turnQuat

Function: turnQuat() ​

turnQuat(q, wx, wy, wz, seconds): Quat

Defined in: packages/shared/src/math.ts:59

A rotation turned by an angular velocity (wx, wy, wz) (rad/s, world axes) for seconds, to the first order (q' = q + ½ (ω, 0) ⊗ q · t, normalized): the small step a body's spin makes between two ticks, carried on or taken back. Negative seconds turn it back.

Parameters ​

q ​

Quat

wx ​

number

wy ​

number

wz ​

number

seconds ​

number

Returns ​

Quat