cf_quat_from_basis¶
Category: math
GitHub: cute_math3d.h
Builds a rotation from three orthonormal basis vectors (the rotation's columns).
| Parameters | Description |
|---|---|
x |
The direction the +x axis maps to. |
y |
The direction the +y axis maps to. |
z |
The direction the +z axis maps to. |
Remarks¶
Assumes a right-handed orthonormal basis; a mirrored (negative determinant) basis has no quaternion and produces garbage. Use cf_quat_from_m4 to pull the rotation out of a full transform instead.