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.
22 lines
512 B
22 lines
512 B
4 years ago
|
module.exports = rotate
|
||
|
|
||
|
/**
|
||
|
* Rotates a mat2 by the given angle
|
||
|
*
|
||
|
* @alias mat2.rotate
|
||
|
* @param {mat2} out the receiving matrix
|
||
|
* @param {mat2} a the matrix to rotate
|
||
|
* @param {Number} rad the angle to rotate the matrix by
|
||
|
* @returns {mat2} out
|
||
|
*/
|
||
|
function rotate(out, a, rad) {
|
||
|
var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]
|
||
|
var s = Math.sin(rad)
|
||
|
var c = Math.cos(rad)
|
||
|
out[0] = a0 * c + a2 * s
|
||
|
out[1] = a1 * c + a3 * s
|
||
|
out[2] = a0 * -s + a2 * c
|
||
|
out[3] = a1 * -s + a3 * c
|
||
|
return out
|
||
|
}
|