function side = line_side ( p1, p2, p )

%*****************************************************************************80
%
%% line_side() reports whether point P is to the left of line [P1,P2].
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 July 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real p1(1,2), p2(1,2): points that define a line.
%
%    real p(1,2): a point.
%
%  Output:
%
%    logical side: is true if P is to the left of line [P1,P2].
%
  v1 = ( p2 - p1 );
  v2 = ( p  - p1 );
  nv = [ - v1(2), v1(1) ];
  t = nv * v2';

  side = ( 0 <= t );

  return
end
