Utils.mix()
Return the linear blend of x and y, i.e. the product of x and (1 - a) plus the product of y and a
Parameters
Name | Type | Description | |
---|---|---|---|
1 | x | number | |
2 | y | number | |
3 | ratio | number |
Return value
number
the result
Usage
import {Utils} from '@lcluber/type6js';
let mix = Utils.mix(2, 4, 0.5);
console.log(mix); //3