length¶
-
taichi_glsl.vector.
length
(x)¶ Calculate the length of a vector.
length returns the length or magnitude of the vector, i.e., sqrt(x[0] ** 2 + x[1] * 2 + …).
- Parameters
x – Specifies a vector of which to calculate the length.
- Returns
The return value can be calculated as sqrt(dot(x, x)).
- See also