Vector2.copy()

Copy the values of the vector given as parameter

Parameters

NameTypeDescription
1vVector2A vector to copy

Return value

Vector2

The vector with its new values

Usage

import {Vector2} from '@lcluber/type6js';

let vector1 = new Vector2(1,1);
let vector2 = new Vector2(2,2);
console.log(vector1); //(1,1)
vector1.copy(vector2);
console.log(vector1); //(2,2)