Vector3.addScalar()

Add a scalar number to each component of this vector

Parameters

NameTypeDescription
1scalarnumber

Return value

Vector3

The vector with its new values

Usage

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

let vector1 = new Vector3(2,2,2);
console.log(vector1); //(2,2,2)
vector.addScalar(2);
console.log(vector1); //(4,4,4)