format
typescript
Vector4.Get(index)class: Vector4
description
Returns the component value at the specified index position in the current Vector object.
parameter
| param_name | type | description |
|---|---|---|
| index | number | The specified index position, which can be a value between [0, 3]. |
reture
| type | description |
|---|---|
number | The component value at the specified index position in the current Vector object. |
code example
typescript
let lhs = new Vector4(1, 2, 3, 4);
Debug.Log(lhs.Get(0)); // 1
Debug.Log(lhs.Get(1)); // 2
Debug.Log(lhs.Get(2)); // 3
Debug.Log(lhs.Get(3)); // 4