function sphere_triangle_angles_to_area_test ( )

%*****************************************************************************80
%
%% sphere_triangle_angles_to_area_test() tests sphere_triangle_angles_to_area().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 November 2025
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'sphere_triangle_angles_to_area_test():\n' );
  fprintf ( 1, '  sphere_triangle_angles_to_area() takes the angles of a\n' );
  fprintf ( 1, '  spherical triangle and determines the area.\n' );

  r = 1.0;
%
%  Set angles in degrees.
%
  ad = 90.0;
  bd = 90.0;
  cd = 90.0;
%
%  Convert to radians.
%
  ar = degrees_to_radians ( ad );
  br = degrees_to_radians ( bd );
  cr = degrees_to_radians ( cd );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sphere has radius %g inches\n', r );
  fprintf ( 1, '  angle A: %g degrees  %g radians\n', ad, ar );
  fprintf ( 1, '  angle B: %g degrees  %g radians\n', bd, br );
  fprintf ( 1, '  angle C: %g degrees  %g radians\n', cd, cr );
%
%  Compute the area of the spherical triangle.
%
  area = sphere_triangle_angles_to_area ( r, ar, br, cr );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  area of spherical triangle = %g radians\n', area );
  fprintf ( 1, '  Correct area                 %g radians\n', pi / 2.0 );

  r = 10.0;
%
%  Set angles in degrees.
%
  ad = 117.0 + ( 58.0 / 60.0 );
  bd =  93.0 + ( 13.8 / 60.0 );
  cd =  70.0 + ( 20.6 / 60.0 );
%
%  Convert to radians.
%
  ar = degrees_to_radians ( ad );
  br = degrees_to_radians ( bd );
  cr = degrees_to_radians ( cd );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sphere has radius %g inches\n', r );
  fprintf ( 1, '  angle A: %g degrees  %g radians\n', ad, ar );
  fprintf ( 1, '  angle B: %g degrees  %g radians\n', bd, br );
  fprintf ( 1, '  angle C: %g degrees  %g radians\n', cd, cr );
%
%  Compute the area of the spherical triangle.
%
  area = sphere_triangle_angles_to_area ( r, ar, br, cr );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  area of spherical triangle = %g radians\n', area );

  return
end
