cf_quat_to_b3¶
Category: physics
GitHub: cute_physics.h
Converts a CF_Quat to a b3Quat.
b3Quat cf_quat_to_b3(CF_Quat q) { b3Quat out; out.v.x = q.x; out.v.y = q.y; out.v.z = q.z; out.s = q.w; return out; }
Remarks¶
The layouts agree -- b3Quat stores the vector part first and calls the scalar
s where CF calls it w -- so this is a plain repack.