function triangle_orientation_test ( )

%*****************************************************************************80
%
%% triangle_orientation_test() tests triangle_orientation().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_orientation_test():\n' );
  fprintf ( 1, '  triangle_orientation()_determines orientation\n' );
  fprintf ( 1, '  of a triangle.\n' );

  for test = 1 : 4

    if ( test == 1 )
      t = [ ...
        4.0, 2.0; ...
        1.0, 5.0; ...
       -2.0, 2.0 ];
    elseif ( test == 2 )
      t = [ ...
        1.0,  5.0; ...
        4.0,  2.0; ...
        1.0, -1.0 ];
    elseif ( test == 3 )
      t = [ ...
        1.0, 5.0; ...
        2.0, 7.0; ...
        3.0, 9.0 ];
    elseif ( test == 4 )
      t = [ ...
        1.0, 5.0; ...
        4.0, 2.0; ...
        1.0, 5.0 ];
    end

    i = triangle_orientation ( t );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Triangle vertices:\n' );
    disp ( t );

    fprintf ( 1, '\n' );
    if ( i == 0 )
      fprintf ( 1, '  The points are counterclockwise.\n' );
    elseif ( i == 1 )
      fprintf ( 1, '  The points are clockwise.\n' );
    elseif ( i == 2 )
      fprintf ( 1, '  The points are colinear.\n' );
    elseif ( i == 3 )
      fprintf ( 1, '  The points are not distinct.\n' );
    else
      fprintf ( 1, '  The return value makes no sense.\n' );
    end

  end

  return
end
