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.
21 lines
477 B
21 lines
477 B
4 years ago
|
module.exports = setAxisAngle
|
||
|
|
||
|
/**
|
||
|
* Sets a quat from the given angle and rotation axis,
|
||
|
* then returns it.
|
||
|
*
|
||
|
* @param {quat} out the receiving quaternion
|
||
|
* @param {vec3} axis the axis around which to rotate
|
||
|
* @param {Number} rad the angle in radians
|
||
|
* @returns {quat} out
|
||
|
**/
|
||
|
function setAxisAngle (out, axis, rad) {
|
||
|
rad = rad * 0.5
|
||
|
var s = Math.sin(rad)
|
||
|
out[0] = s * axis[0]
|
||
|
out[1] = s * axis[1]
|
||
|
out[2] = s * axis[2]
|
||
|
out[3] = Math.cos(rad)
|
||
|
return out
|
||
|
}
|