function [ value, seed ] = chebyshev1_sample ( seed )

%*****************************************************************************80
%
%% CHEBYSHEV1_SAMPLE samples the Chebyshev1 distribution.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 August 2016
%
%  Parameters:
%
%    Input, integer SEED, a seed for the random number generator.
%
%    Output, real VALUE, a random value between 0 and 1.
%
%    Output, integer SEED, an updated seed for the random number generator.
%
  [ cdf, seed ] = r8_uniform_01 ( seed );

  value = chebyshev1_cdf_inv ( cdf );

  return
end
