function x = semicircular_sample ( a, b )

%*****************************************************************************80
%
%% semicircular_sample() samples the Semicircular PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 October 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, the parameters of the PDF.
%    0.0 < B.
%
%  Output:
%
%    real X, a sample of the PDF.
%
  radius = rand ( 1, 1 );
  radius = b * sqrt ( radius );
  angle = pi * rand ( 1, 1 );
  x = a + radius * cos ( angle );

  return
end
