function c = c8vec_uniform_01 ( n )

%*****************************************************************************80
%
%% c8vec_uniform_01() returns a unit pseudorandom C8VEC.
%
%  Discussion:
%
%    The angles should be uniformly distributed between 0 and 2 * PI,
%    the square roots 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:
%
%    28 November 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of values to compute.
%
%  Output:
%
%    complex C(N), the pseudorandom complex vector.
%
  c = zeros ( n, 1 );

  for j = 1 : n

    r = sqrt ( rand ( 1, 1 ) );

    theta = 2.0 * pi * rand ( 1, 1 );

    c(j) = r * ( cos ( theta ) + sin ( theta ) * i );

  end

  return
end
