B2G/gecko/browser/devtools/tilt/TiltMath.jsm
/**
   * Creates a new instance of a quat4 using the default Float32Array type.
   * Any array containing at least 4 numeric elements can serve as a quat4.
   *
   * @param {Array} aQuat
   *                optional, quat4 containing values to initialize with
   *
   * @return {Array} a new instance of a quat4
   */
Creates a new instance of a quat4 using the default Float32Array type.
Any array containing at least 4 numeric elements can serve as a quat4.

@param {Array} aQuat
optional, quat4 containing values to initialize with

@return {Array} a new instance of a quat4
Creates a new instance of a quat4 using the default Float32Array type . Any array containing at least 4 numeric elements can serve as a quat4 . @param { Array } aQuat optional quat4 containing values to initialize with @return { Array } a new instance of a quat4
function Q4_create(aQuat)
  {
    let dest = new Float32Array(4);
    if (aQuat) {
      quat4.set(aQuat, dest);
    } else {
      quat4.identity(dest);
    }
    return dest;
  }
function Q4_create ( aQuat ) { let dest = new Float32Array ( 4 ) ; if ( aQuat ) { quat4 . set ( aQuat , dest ) ; } else { quat4 . identity ( dest ) ; } return dest ; }
Creates a new instance of a quat4 using the default Float32Array type.
Creates a new instance of a quat4 using the default Float32Array type .