Vector3.minScalar()

Compare each axis of this vector to the scalar given as parameter and apply the scalar if the value of the axis is higher

Parameters

NameTypeDescription
1scalarnumber

Return value

Vector3

The vector with its new values

Usage

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

let vector1 = new Vector3(1,2,3);
console.log(vector1); //(1,2,3)
vector1.minScalar(2);
console.log(vector1); //(1,2,2)