TensorMath.getVectorsLength
FunctionCalculates the length of all vectors in an array.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
getVectorsLength(
vectors,vectorsShape,output):void
Calculates the length of all vectors in an array. Vectors can be of any dimension count.
vectors - Float32Array of size (vector dimension count * vector count). Vectors to measure the length of
vectorsShape - Should be {vector dimension count, vector count, 1}
output - Float32Array of size (vector count). For each vector in vectors, its length will be written to this array
Parameters
| Parameter | Type |
|---|---|
vectors | Float32Array |
vectorsShape | vec3 |
output | Float32Array |
Returns
void