function rotation_quat2mat_test ( )

%*****************************************************************************80
%
%% ROTATION_QUAT2MAT_TEST tests ROTATION_QUAT2MAT.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    02 August 2018
%
%  Author:
%
%    John Burkardt
%
  q = [ 0.836516; 0.12941; -0.482963; -0.224144 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ROTATION_QUAT2MAT_TEST\n' );
  fprintf ( 1, '  ROTATION_QUAT2MAT computes a rotation axis\n' );
  fprintf ( 1, '  from a rotation quaternion.\n' );
  fprintf ( 1, '  ROTATION_MAT2QUAT computes a rotation\n' );
  fprintf ( 1, '  quaternion from a rotation matrix.\n' );

  r8vec_print ( 4, q, '  The rotation quaternion:' );

  a = rotation_quat2mat ( q );

  r8mat_print ( 3, 3, a, '  The rotation matrix:' );

  q = rotation_mat2quat ( a );

  r8vec_print ( 4, q, '  The recovered rotation quaternion:' );

  return
end
