function angle_shift_deg_test ( )

%*****************************************************************************80
%
%% ANGLE_SHIFT_DEG_TEST tests ANGLE_SHIFT_DEG.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 February 2021
%
%  Author:
%
%    John Burkardt
%
  test_num = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ANGLE_SHIFT_DEG_TEST\n' );
  fprintf ( 1, '  ANGLE_SHIFT_DEG shifts an angle by multiples of\n' );
  fprintf ( 1, '  360 until it lies between BETA and BETA+360.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '     ALPHA      BETA     GAMMA   BETA+360\n' );
  fprintf ( 1, '\n' );

  angle_lo = -720.0;
  angle_hi = +720.0;

  seed = 123456789;

  for test = 1 : test_num

    alpha = angle_lo + ( angle_hi - angle_lo ) * rand ( 1, 1 );
    beta = angle_lo + ( angle_hi - angle_lo ) * rand ( 1, 1 );

    gamma = angle_shift_deg ( alpha, beta );

    fprintf ( 1, '  %10f  %10f  %10f  %10f\n', ...
      alpha, beta, gamma, beta + 360 );

  end 

  return
end
