quaternion_unitize
- compas.geometry.quaternion_unitize(q)[source]
Makes a quaternion unit-length.
- Parameters
q ([float, float, float, float] |
compas.geometry.Quaternion
) – Quaternion or sequence of four floats[w, x, y, z]
.- Returns
[float, float, float, float] – Quaternion of length 1 as a list of four real values
[nw, nx, ny, nz]
.