Vector2.setMinAxis()
Set the smallest axis with the scalar given as parameter
Parameters
Name | Type | Description | |
---|---|---|---|
1 | scalar | number | A scalar number to set the min axis with |
Return value
Vector2
The vector with its new axis value
Usage
import {Vector2} from '@lcluber/type6js';
let vector = new Vector2(1,2);
console.log(vector); //(1,2)
vector.setMaxAxis(3);
console.log(vector); //(1,3)
vector.setMinAxis(2);
console.log(vector); //(2,3)