cf_quat¶
Category: math
GitHub: cute_math3d.h
Constructs a CF_Quat component-wise.
CF_Quat cf_quat(float x, float y, float z, float w) { CF_Quat q; q.x = x; q.y = y; q.z = z; q.w = w; return q; }
| Parameters | Description |
|---|---|
x |
The x component of the vector part. |
y |
The y component of the vector part. |
z |
The z component of the vector part. |
w |
The scalar part. |
Return Value¶
Returns the quaternion { x, y, z, w }.
Remarks¶
The components are not normalized for you. To construct a rotation, prefer cf_quat_from_axis_angle.
Related Pages¶
CF_Quat
cf_quat_identity
cf_quat_from_axis_angle
cf_quat_norm