magnitude(...)
Studio is being deprecated, please head over to the documentation page for Mattercraft, our most advanced 3D tool for the web, where you can find the most recent information and tutorials.
magnitude(l : number[]) : number;
Calculates the length of a three-dimensional vector.
The length of the vector is calculated as follows sqrt(x*x + y*y + z*z)
.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
l | number[] | The vector to add. |
Returns
Section titled “Returns”The magnitude of the vector as a single number.