B2G/gecko/browser/devtools/tilt/TiltMath.jsm
/**
   * Calculate the inverse of a quat4.
   *
   * @param {Array} aQuat
   *                quat4 to calculate the inverse of
   * @param {Array} aDest
   *                optional, quat4 receiving the inverse values
   *                if not specified result is written to the first operand
   *
   * @return {Array} the destination quat if specified, first operand otherwise
   */
Calculate the inverse of a quat4.
@param {Array} aQuat
quat4 to calculate the inverse of
@param {Array} aDest
optional, quat4 receiving the inverse values
if not specified result is written to the first operand

@return {Array} the destination quat if specified, first operand otherwise
Calculate the inverse of a quat4 . @param { Array } aQuat quat4 to calculate the inverse of @param { Array } aDest optional quat4 receiving the inverse values if not specified result is written to the first operand @return { Array } the destination quat if specified first operand otherwise
function Q4_inverse(aQuat, aDest)
  {
    if (!aDest) {
      aDest = aQuat;
    }
    aQuat[0] = -aQuat[0];
    aQuat[1] = -aQuat[1];
    aQuat[2] = -aQuat[2];
    return aQuat;
  }
function Q4_inverse ( aQuat , aDest ) { if ( ! aDest ) { aDest = aQuat ; } aQuat [ 0 ] = - aQuat [ 0 ] ; aQuat [ 1 ] = - aQuat [ 1 ] ; aQuat [ 2 ] = - aQuat [ 2 ] ; return aQuat ; }
Calculate the inverse of a quat4.
Calculate the inverse of a quat4 .