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 MIT license. 
%
%  Modified:
%
%    22 December 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A, the mean of the normal PDF.
%
%    real B, the standard deviation of the normal PDF.
%
%    integer SEED, a seed for the random number generator.
%
%  Output:
%
%    integer X, a sample of the standard normal PDF.
%
%    integer SEED, an updated seed for the random number generator.
%
  r1 = rand ( 1, 1 );
  r2 = rand ( 1, 1 );
  x = sqrt ( - 2.0 * log ( r1 ) ) * cos ( 2.0 * pi * r2 );

  x = round ( a + b * x );

  return
end
