function value = nodes_are_collinear ( n1, n2, n3 )

%*****************************************************************************80
%
%% nodes are collinear() is true if three integer valued nodes are collinear.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 October 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n1(2), n2(2), n3(2): the x and y coordinates of 3 nodes.
%
%  Output:
%
%    boolean value: true if the nodes are collinear.
%
  x1 = n1(1);
  y1 = n1(2);

  x2 = n2(1);
  y2 = n2(2);

  x3 = n3(1);
  y3 = n3(2);
%
%  slope1 =?= slope2
%
  if ( ( y2 - y1 ) * ( x3 - x2 ) == ( y3 - y2 ) * ( x2 - x1 ) )
    value = true;
  else
    value = false;
  end

  return
end

