function c = 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:
%
%    21 September 2006
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    complex C, the complex value.
%
  r = sqrt ( rand ( 1, 1 ) );
  theta = 2.0 * pi * rand ( 1, 1 );

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

  return
end
