Cogl.vector3_normalize
function vector3_normalize(vector: Number(gfloat)): void { // Gjs wrapper for cogl_vector3_normalize() }
Updates the vector so it is a "unit vector" such that the vector<!-- -->s magnitude or length is equal to 1.
<note>It's safe to use this function with the [0, 0, 0] vector, it will not try to divide components by 0 (its norm) and will leave the vector untouched.</note>
Since 1.4
- vector
The 3 component vector you want to manipulate