format
typescript
Vector2.Set(index, value)class: Vector2
description
Set the value of the component at the specified index in the current Vector object.
parameter
| param_name | type | description |
|---|---|---|
| index | number | The specified index position, which can be 0 or 1. |
| value | number | The value to set for the component. |
reture
| type | description |
|---|---|
void |
code example
typescript
let lhs = new Vector2(1, 2);
lhs.Set(0, 1);
lhs.Set(1, 2);