function x = folded_normal_sample ( a, b )

%*****************************************************************************80
%
%% folded_normal_sample() samples the Folded Normal PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 January 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, the parameters of the PDF.
%    0.0 <= A,
%    0.0 < B.
%
%  Output:
%
%    real X, a sample of the PDF.
%
  cdf = rand ( 1, 1 );

  x = folded_normal_cdf_inv ( cdf, a, b );

  return
end
