angleTo method

double angleTo(
  1. Quaternion q
)

Computes the shortest angle between two rotation defined by this quaternion and the given one.

Implementation

double angleTo(Quaternion q ) {
	return 2 * math.acos( ( MathUtils.clamp( dot( q ), - 1, 1 ) ).abs() );
}