function line_side_test ( )

%*****************************************************************************80
%
%% line_side_test() tests line_side().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'line_side_test():\n' );
  fprintf ( 1, '  line_side() reports whether point p is to the left\n' );
  fprintf ( 1, '  of a line [p1,p2].\n' );

  p1 = [ 4.0, 0.0 ];
  p2 = [ 3.0, 4.0 ];

  p_test = [ 1, 4;
        2, 1;
        2, 3;
        3, 2;
        3, 4;
        3, 5;
        4, 1;
        4, 5 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '  P1 = (%10f,%10f)\n', p1 );
  fprintf ( 1, '  P2 = (%10f,%10f)\n', p2 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  P                   S' );
  fprintf ( 1, '\n' );

  for i = 1 : 8
    p = p_test(i,1:2);
    tf = line_side ( p1, p2, p );
    fprintf ( 1, '  (%10f,%10f)  %s\n', p, mat2str ( tf ) );
  end

  return
end
