Vec3.length
Returns the length of the vector.
Kind: Function
Environments: Game, Terrain
Game
vec3:length( )
If you want the squared length, using length2 is faster than squaring the result of this function.
Parameters:
| Name | Type | Description |
|---|---|---|
vector |
Vec3 | The vector. |
Returns:
| Type | Description |
|---|---|
| number | The length of the vector. |
Terrain
vec3:length( )
Open the full Terrain reference
If you want the squared length, using length2 is faster than squaring the result of this function.
Parameters:
| Name | Type | Description |
|---|---|---|
vector |
Vec3 | The vector. |
Returns:
| Type | Description |
|---|---|
| number | The length of the vector. |