normalize¶
-
taichi_glsl.vector.
normalize
(v)¶ Calculates the unit vector in the same direction as the original vector.
normalize returns a vector with the same direction as its parameter, v, but with length 1.
- Parameters
v – Specifies the vector to normalize.
- Returns
The return value can be calculated as v * invLength(v).
- See also