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.
31 lines
648 B
31 lines
648 B
module.exports = translate
|
|
|
|
/**
|
|
* Translate a mat3 by the given vector
|
|
*
|
|
* @alias mat3.translate
|
|
* @param {mat3} out the receiving matrix
|
|
* @param {mat3} a the matrix to translate
|
|
* @param {vec2} v vector to translate by
|
|
* @returns {mat3} out
|
|
*/
|
|
function translate(out, a, v) {
|
|
var a00 = a[0], a01 = a[1], a02 = a[2]
|
|
var a10 = a[3], a11 = a[4], a12 = a[5]
|
|
var a20 = a[6], a21 = a[7], a22 = a[8]
|
|
var x = v[0], y = v[1]
|
|
|
|
out[0] = a00
|
|
out[1] = a01
|
|
out[2] = a02
|
|
|
|
out[3] = a10
|
|
out[4] = a11
|
|
out[5] = a12
|
|
|
|
out[6] = x * a00 + y * a10 + a20
|
|
out[7] = x * a01 + y * a11 + a21
|
|
out[8] = x * a02 + y * a12 + a22
|
|
|
|
return out
|
|
}
|
|
|