function r = r8vec_wrap ( r, rlo, rhi )

%*****************************************************************************80
%
%% r8vec_wrap forces an r8vec to lie between given limits by wrapping.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 May 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real R(*), a value.
%
%    real RLO, RHI, the desired bounds.
%
%  Output:
%
%    real R(*), a "wrapped" version of the value.
%
  r = mod ( r, rhi - rlo );

  return
end
