function volume = simplex_general_volume ( m, t )

%*****************************************************************************80
%
%% simplex_general_volume() computes the volume of a simplex in N dimensions.
%
%  Discussion:
%
%    The formula is: 
%
%      volume = 1/M! * det ( B )
%
%    where B is the M by M matrix obtained by subtracting one
%    vector from all the others.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    29 March 2003
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the dimension of the space.
%
%    real T(M,M+1), the vertices.
%
%  Output:
%
%    real VOLUME, the volume of the simplex.
%
  b(1:m,1:m) = t(1:m,1:m);
  for j = 1 : m
    b(1:m,j) = b(1:m,j) - t(1:m,m+1);
  end

  volume = abs ( det ( b ) );

  for i = 1 : m
    volume = volume / i;
  end

  return
end
