StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
498 B
20 lines
498 B
4 years ago
|
module.exports = lerp;
|
||
|
|
||
|
/**
|
||
|
* Performs a linear interpolation between two vec3's
|
||
|
*
|
||
|
* @param {vec3} out the receiving vector
|
||
|
* @param {vec3} a the first operand
|
||
|
* @param {vec3} b the second operand
|
||
|
* @param {Number} t interpolation amount between the two inputs
|
||
|
* @returns {vec3} out
|
||
|
*/
|
||
|
function lerp(out, a, b, t) {
|
||
|
var ax = a[0],
|
||
|
ay = a[1],
|
||
|
az = a[2]
|
||
|
out[0] = ax + t * (b[0] - ax)
|
||
|
out[1] = ay + t * (b[1] - ay)
|
||
|
out[2] = az + t * (b[2] - az)
|
||
|
return out
|
||
|
}
|