function quad_is_simple_test ( )

%*****************************************************************************80
%
%% QUAD_IS_SIMPLE_TEST tests QUAD_IS_SIMPLE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'QUAD_IS_SIMPLE_TEST\n' );
  fprintf ( 1, '  QUAD_IS_SIMPLE is true if a quadrilateral is "simple",\n' );
  fprintf ( 1, '  that is, non-degenerate.\n' );

  q = [ ...
    0.0, 1.0, 1.0, 0.0; ...
    0.0, 0.0, 1.0, 1.0 ];

  r82vec_print ( 4, q, '  Quadrilateral q:' );
  value = quad_is_simple ( q );
  fprintf ( 1, '  quad_is_simple ( q ) = %g\n', value );

  q = [ ...
    0.0, 1.0, 2.0, 0.0; ...
    0.0, 0.0, 1.0, 1.0 ];

  r82vec_print ( 4, q, '  Quadrilateral q:' );
  value = quad_is_simple ( q );
  fprintf ( 1, '  quad_is_simple ( q ) = %g\n', value );

  q = [ ...
    0.0, 1.0, 0.25, 0.0; ...
    0.0, 0.0, 0.25, 1.0 ];

  r82vec_print ( 4, q, '  Quadrilateral q:' );
  value = quad_is_simple ( q );
  fprintf ( 1, '  quad_is_simple ( q ) = %g\n', value );

  q = [ ...
    0.0, 1.0, -0.5, 0.0; ...
    0.0, 0.0,  0.5, 1.0 ];

  r82vec_print ( 4, q, '  Quadrilateral q:' );
  value = quad_is_simple ( q );
  fprintf ( 1, '  quad_is_simple ( q ) = %g\n', value );

  return
end
