Vector3.addScaledVector()
Scale the vector given as first parameter with the scalar number given as second parameter then add the result to this vector
Parameters
Name | Type | Description | |
---|---|---|---|
1 | v | Vector3 | |
2 | scalar | number |
Return value
Vector3
The vector with its new values
Usage
import {Vector3} from '@lcluber/type6js';
let vector1 = new Vector3(2,2,2);
let vector2 = new Vector3(3,3,3);
console.log(vector1); //(2,2,2)
vector1.addScaledVector(vector2, 2);
console.log(vector1); //(8,8,8)