function rotation_mat2axis_test ( )

%*****************************************************************************80
%
%% rotation_mat2axis_test() tests rotation_mat2axis().
%
%  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_mat2axis_test()\n' );
  fprintf ( 1, '  rotation_mat2axis() computes a rotation axis\n' );
  fprintf ( 1, '  and angle from a rotation matrix.\n' );
  fprintf ( 1, '  rotation_axis2mat() computes a rotation matrix\n' );
  fprintf ( 1, '  from a rotation axis and angle.\n' );

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

  [ axis, angle ] = rotation_mat2axis ( a );

  r8vec_print ( 3, axis, '  The rotation axis:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The rotation angle is %f\n', angle );

  a = rotation_axis2mat ( axis, angle );

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

  return
end
