conjugateQuaternion = function( quaternion ) {
            return [ quaternion[ 0 ], -quaternion[ 1 ], -quaternion[ 2 ], -quaternion[ 3 ] ];
        }
Returns the conjugate quaternion of a quaternion

https://en.wikipedia.org/wiki/Quaternion#Conjugation,_the_norm,_and_reciprocal