function rotation_mat2quat_test ( )

%*****************************************************************************80
%
%% rotation_mat2quat_test() tests ROTATION_MAT2QUAT.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 July 2018
%
%  Author:
%
%    John Burkardt
%
  a = [ ...
    0.43301269,  0.25,       -0.86602539; ...
   -0.5,         0.86602539,  0.0; ...
    0.75,        0.43301269,  0.5 ];

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

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

  q = rotation_mat2quat ( a );

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


  a = rotation_quat2mat ( q );

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

  return
end
