format
typescript
Vector4.Set(index, value)class: Vector4
description
Set the value of the component at the specified index in the current Vector4 object.
parameter
| param_name | type | description |
|---|---|---|
| index | number | The specified index position, which can be a value between [0, 3]. |
| value | number | The value to set for the component. |
reture
| type | description |
|---|---|
void |
code example
typescript
let v4 = new Vector4(-1, -2, -3, -4);
v4.Set(0, 1);
v4.Set(1, 2);
v4.Set(2, 3);
v4.Set(3, 4);