function vector_unit_nd_test ( )

%*****************************************************************************80
%
%% VECTOR_UNIT_ND_TEST tests VECTOR_UNIT_ND;
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    01 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'VECTOR_UNIT_ND_TEST\n' );
  fprintf ( 1, '  VECTOR_UNIT normalizes a vector in ND.\n' );
 
  m = 5;
  seed = 123456789;
  [ x, seed ] = r8vec_uniform_ab ( m, -10.0, +10.0, seed );
  r8vec_print ( m, x, '  Original vector:' );
  x_norm = norm ( x );
  fprintf ( 1, '  Norm of original vector = %g\n', x_norm );

  x = vector_unit_nd ( m, x );
  r8vec_print ( m, x, '  Normalized vector:' );
  x_norm = norm ( x );
  fprintf ( 1, '  Norm of normalized vector = %g\n', x_norm );
  return
end
