format
typescript
Vector4.Distance(lhs, rhs)class: Vector4
description
Calculates the straight-line distance between two vectors.
parameter
| param_name | type | description |
|---|---|---|
| lhs | Vector4 | The lhs vector. |
| rhs | Vector4 | The rhs vector. |
return
| type | description |
|---|---|
number | The distance between lhs and rhs. |
code example
typescript
let lhs = new Vector4(1, 2, 3, 4);
let rhs = new Vector4(4, 6, 1, 2);
Debug.Log(Vector4.Distance(lhs, rhs));