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

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

      var eps = Quaternion['EPSILON'];

      // maybe check for NaN's here?
      return Math.abs(P['w'] - this['w']) < eps
              && Math.abs(P['x'] - this['x']) < eps
              && Math.abs(P['y'] - this['y']) < eps
              && Math.abs(P['z'] - this['z']) < eps;
    }
function(w, x, y, z) {

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

      var eps = Quaternion['EPSILON'];

      // maybe check for NaN's here?
      return Math.abs(P['w'] - this['w']) < eps
              && Math.abs(P['x'] - this['x']) < eps
              && Math.abs(P['y'] - this['y']) < eps
              && Math.abs(P['z'] - this['z']) < eps;
    }
function ( w , x , y , z ) { parse ( P , w , x , y , z ) ; var eps = Quaternion [ 'EPSILON' ] ; // maybe check for NaN's here? return Math . abs ( P [ 'w' ] - this [ 'w' ] ) < eps && Math . abs ( P [ 'x' ] - this [ 'x' ] ) < eps && Math . abs ( P [ 'y' ] - this [ 'y' ] ) < eps && Math . abs ( P [ 'z' ] - this [ 'z' ] ) < eps ; }
Checks if two quats are the same

@param {number|Object|string} w real
@param {number=} x imag
@param {number=} y imag
@param {number=} z imag
@returns {boolean}
Checks if two quats are the same