function check = planck_check ( a, b )

%*****************************************************************************80
%
%% planck_check() checks the parameters of the Planck PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 April 2016
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, B, the parameters of the PDF.
%    0.0 < A,
%    0.0 < B.
%
%  Output:
%
%    logical CHECK, is TRUE if the parameters are legal.
%
  if ( a <= 0.0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'PLANCK_CHECK - Fatal error!\n' );
    fprintf ( 1, '  A <= 0.\n' );
    check = 0;
    return
  end

  if ( b <= 0.0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'PLANCK_CHECK - Fatal error!\n' );
    fprintf ( 1, '  B <= 0.\n' );
    check = 0;
    return
  end

  check = 1;

  return
end
