Vector2.min()
Compare this vector to the vector given as parameter and set the lowest value of each axis to this vector
Parameters
Name | Type | Description | |
---|---|---|---|
1 | v | Vector2 |
Return value
Vector2
The vector with its new values
Usage
import {Vector2} from '@lcluber/type6js';
let vector1 = new Vector2(1,3);
let vector2 = new Vector2(2,2);
console.log(vector1); //(1,3)
vector1.min(vector2);
console.log(vector1); //(1,2)