function [ x, seed ] = i4_normal_ab ( a, b, seed )

%*****************************************************************************80
%
%% I4_NORMAL_AB returns a scaled pseudonormal I4.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    22 December 2017
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, real A, the mean of the normal PDF.
%
%    Input, real B, the standard deviation of the normal PDF.
%
%    Input, integer SEED, a seed for the random number generator.
%
%    Output, integer X, a sample of the standard normal PDF.
%
%    Output, integer SEED, an updated seed for the random number generator.
%
  [ r1, seed ] = r8_uniform_01 ( seed );
  [ r2, seed ] = r8_uniform_01 ( seed );
  x = sqrt ( - 2.0 * log ( r1 ) ) * cos ( 2.0 * pi * r2 );

  x = round ( a + b * x );

  return
end
