Vector2.scale()

Scale a vector by the scalar number given as parameter

Parameters

NameTypeDescription
1valuenumber

Return value

Vector2

The vector with its new values

Usage

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

let vector = new Vector2(2,2);
console.log(vector1); //(2,2)
vector.scale(3);
console.log(vector); //(6,6)