function j = rand_int2 ( i1, i2 )

%*****************************************************************************80
%
%% RAND_INT2 returns a random integer between I1 and I2.
%
  j = i1 + floor ( ( i2 + 1 - i1 ) * rand ( ) );

  return
end
