function circle_imp_point_dist_2d_test ( )

%*****************************************************************************80
%
%% CIRCLE_IMP_POINT_DIST_2D_TEST tests CIRCLE_IMP_POINT_DIST_2D.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 January 2018
%
%  Author:
%
%    John Burkardt
%
  ntest = 5;
  center(1:2,1) = [ 0.0; 0.0 ];
  r = 5.0;
  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'CIRCLE_IMP_POINT_DIST_2D_TEST\n' );
  fprintf ( 1, '  CIRCLE_IMP_POINT_DIST_2D checks, by finding the\n' );
  fprintf ( 1, '  distance D from a point (X,Y) to a circle.\n' );

  circle_imp_print_2d ( r, center, '  The circle:' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '       X       Y       D\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 10

    [ x, seed ] = r8_uniform_ab ( -10.0, +10.0, seed );
    [ y, seed ] = r8_uniform_ab ( -10.0, +10.0, seed );
    d = circle_imp_point_dist_2d ( r, center, [ x; y ] );
    fprintf ( 1, '  %8.4f  %8.4f  %8.4f\n', x, y, d );

  end

  return
end
