code: public static double dotProduct(Quat4d q1, Quat4d q2) {
  		return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w;
  	}
docs: Compute the dot (inner) product of two quaternions.
  
  @param q1
  quaternion as Quat4d object
  @param q2
  quaternion as Quat4d object
  @return the value of the quaternion dot product