Vector3.copy()

Copy the values of the vector given as parameter

Parameters

NameTypeDescription
1vVector3

Return value

Vector3

The vector with its new values

Usage

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

// Copy from Type6.Vector3 or any object containing properties 'x', 'y' and 'z'
let vectorOne = new Vector3(2,2,2);
let vectorTwo = new Vector3(1,1,1);
let vectorThree = new Vector3(vectorOne);
console.log(vectorThree); //(2,2,2)
vectorThree.copy(vectorTwo);
console.log(vectorThree); //(1,1,2)