dot method

double dot(
  1. Quaternion q
)

Computes the dot product of this and the given quaternion.

Implementation

double dot(Quaternion q ) {
	return ( x * q.x ) + ( y * q.y ) + ( z * q.z ) + ( w * q.w );
}