function line_parameter_s_test ( )

%*****************************************************************************80
%
%% line_parameter_s_test() tests line_parameter_s().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'line_parameter_s_test():\n' );
  fprintf ( 1, '  line_parameter_s() evaluates the s parameter\n' );
  fprintf ( 1, '  for a point p with respect to a line [p1,p2].\n' );

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

  p = [ 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
    s = line_parameter_s ( p1, p2, p(i,1:2) );
    fprintf ( 1, '  (%10f,%10f)  %10f\n', p(i,1:2), s );
  end

  return
end
