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.
 
 
 
 
StackGenVis/frontend/node_modules/gl-quat/calculateW.js

20 lines
508 B

module.exports = calculateW
/**
* Calculates the W component of a quat from the X, Y, and Z components.
* Assumes that quaternion is 1 unit in length.
* Any existing W component will be ignored.
*
* @param {quat} out the receiving quaternion
* @param {quat} a quat to calculate W component of
* @returns {quat} out
*/
function calculateW (out, a) {
var x = a[0], y = a[1], z = a[2]
out[0] = x
out[1] = y
out[2] = z
out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z))
return out
}