function z = c8_uniform_01 ( )

%*****************************************************************************80
%
%% c8_uniform_01() returns a unit pseudorandom C8.
%
%  Discussion:
%
%    The angle should be uniformly distributed between 0 and 2 * PI,
%    the square root of the radius uniformly distributed between 0 and 1.
%
%    This results in a uniform distribution of values in the unit circle.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 November 2021
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    complex Z, the pseudorandom complex value.
%
  r = sqrt ( rand ( ) );
  theta = 2.0 * pi * rand ( );

  z = r * ( cos ( theta ) + i * sin ( theta ) );

  return
end
