function disk_triangle_picking_test ( )

%*****************************************************************************80
%
%% disk_triangle_picking_test() tests disk_triangle_picking().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 March 2025
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../disk_triangle_picking' )

  timestamp ( );

  fprintf ( 1, '\n' )
  fprintf ( 1, 'disk_triangle_picking_test():\n' )
  fprintf ( 1, '  MATLAB/Octave version: %s\n', version ( ) );
  fprintf ( 1, '  disk_triangle_picking() estimates the average area of\n' )
  fprintf ( 1, '  a random triangle in the unit disk.\n' )

  n = 1000;
  area_average = disk_triangle_picking ( n );
  fprintf ( 1, '  Using %d trials, the average triangle area is %g\n', n, area_average )
  exact = 35 / 48 / pi;
  fprintf ( 1, '  Exact value is %g\n', exact );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'disk_triangle_picking_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../disk_triangle_picking' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 November 2022
%
%  Author:
%
%    John Burkardt
%
  t = now ( );
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end
