Vector2.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
Name | Type | Description | |
---|---|---|---|
1 | scalar | number |
Return value
Vector2
The vector with its new values
Usage
import {Vector2} from '@lcluber/type6js';
let vector = new Vector2(1,3);
console.log(vector1); //(1,3)
vector.minScalar(2);
console.log(vector); //(1,2)