function triangle_distance_test ( )

%*****************************************************************************80
%
%% TRIANGLE_DISTANCE_TEST...
%
  test_num = 5;
  p_test(1:2,1:test_num) = [
    -2.0, 1.0;
     0.0, 2.0;
     2.0, 3.0;
     4.0, 4.0;
     6.0, 5.0 ]';

  a = [ 0.0, 2.0 ]';
  b = [ 4.0, 1.0 ]';
  c = [ 3.0, 5.0 ]';

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

  for test = 1 : test_num
    p(1:2,1) = p_test(1:2,test);
    d = triangle_distance ( a, b, c, p );
    fprintf ( 1, '  %10f  %10f  %10f\n', p(1:2,1), d );
  end

  return
end
