Vector3.maxScalar()

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

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.maxScalar(2);
console.log(vector1); //(2,2,3)