quaternion.js
function(w, x, y, z) {

      parse(P, w, x, y, z);

      // dot(Q1, Q2) := w1 * w2 + dot(v1, v2)

      return this['w'] * P['w'] + this['x'] * P['x'] + this['y'] * P['y'] + this['z'] * P['z'];
    }
function(w, x, y, z) {

      parse(P, w, x, y, z);

      // dot(Q1, Q2) := w1 * w2 + dot(v1, v2)

      return this['w'] * P['w'] + this['x'] * P['x'] + this['y'] * P['y'] + this['z'] * P['z'];
    }
function ( w , x , y , z ) { parse ( P , w , x , y , z ) ; // dot(Q1, Q2) := w1 * w2 + dot(v1, v2) return this [ 'w' ] * P [ 'w' ] + this [ 'x' ] * P [ 'x' ] + this [ 'y' ] * P [ 'y' ] + this [ 'z' ] * P [ 'z' ] ; }
Calculates the dot product of two quaternions

@param {number|Object|string} w real
@param {number=} x imag
@param {number=} y imag
@param {number=} z imag
@returns {number}
Calculates the dot product of two quaternions