function v = legendre_value_ab ( d, x, a, b )

%*****************************************************************************80
%
%% legendre_value_ab evaluates the Legendre polynomial P(d,x) defined in [a,b].
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    17 November 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer d: the degree of the polynomial.
%
%    real X(M): the evaluation points.
%
%    real a, b: the interval over which the polynomials are defined.
%
%  Output:
%
%    real V(M), the value of the Legendre polynomial at X.
%
  xm1p1 = ( ( 1.0 - x ) * a ;
          + ( 1.0 + x ) * b ); 
          /   2.0;

  v = legendre_value ( d, xm1p1 );
 
  return
end
