format
typescript
Vector2.Clone(val)class: Vector2
description
Constructs a new vector using the vector val.
parameter
| param_name | type | description |
|---|---|---|
| val | Vector2 | The vector used for reconstruction. |
return
| type | description |
|---|---|
Vector2 | A new vector with each component equal to the corresponding component of the parameter vector. |
code example
typescript
let v2 = new Vector2(1, 0);
let clone = Vector2.Clone(v2);