Skip to content

format

typescript
Vector2.Clone(val)

class: Vector2

description

Constructs a new vector using the vector val.

parameter

param_nametypedescription
valVector2The vector used for reconstruction.

return

typedescription
Vector2A 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);