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.
23 lines
531 B
23 lines
531 B
4 years ago
|
module.exports = rotateZ
|
||
|
|
||
|
/**
|
||
|
* Rotates a quaternion by the given angle about the Z axis
|
||
|
*
|
||
|
* @param {quat} out quat receiving operation result
|
||
|
* @param {quat} a quat to rotate
|
||
|
* @param {number} rad angle (in radians) to rotate
|
||
|
* @returns {quat} out
|
||
|
*/
|
||
|
function rotateZ (out, a, rad) {
|
||
|
rad *= 0.5
|
||
|
|
||
|
var ax = a[0], ay = a[1], az = a[2], aw = a[3],
|
||
|
bz = Math.sin(rad), bw = Math.cos(rad)
|
||
|
|
||
|
out[0] = ax * bw + ay * bz
|
||
|
out[1] = ay * bw - ax * bz
|
||
|
out[2] = az * bw + aw * bz
|
||
|
out[3] = aw * bw - az * bz
|
||
|
return out
|
||
|
}
|